/* Vacay Estate — admin styles (matches brand, utilitarian layout) */
:root {
  --ivory: #faf6ef;
  --ivory-deep: #f3ead9;
  --ink: #22301f;
  --ink-soft: #46523f;
  --muted: #6b7263;
  --green: #2e4a3b;
  --green-deep: #23392e;
  --terracotta: #c2643c;
  --line: #ded4c0;
  --white: #fffdf9;
  --danger: #a83b2a;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(34, 48, 31, 0.08);
  --shadow-md: 0 10px 30px rgba(34, 48, 31, 0.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body.admin-body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.6;
  font-size: 0.95rem;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
h1 { font-family: var(--font-display); font-weight: 500; font-size: 2rem; margin-bottom: 1.5rem; }
h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; margin-bottom: 1rem; }
.admin-container { max-width: 62rem; margin: 0 auto; padding: 0 1.25rem; }
.admin-main { padding: 2.5rem 1.25rem 4rem; }

/* header */
.admin-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.admin-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem; flex-wrap: wrap; }
.admin-brand { display: flex; align-items: center; gap: 0.7rem; }
.admin-brand img { height: 36px; width: auto; }
.admin-brand span {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--green); color: var(--white); padding: 0.2rem 0.55rem; border-radius: 999px;
}
.admin-nav { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.admin-nav a { font-size: 0.875rem; font-weight: 500; color: var(--ink-soft); padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.admin-nav a:hover, .admin-nav a.active { color: var(--ink); border-bottom-color: var(--terracotta); }
.admin-logout { font-size: 0.875rem; font-weight: 500; color: var(--danger); }
.admin-logout:hover { text-decoration: underline; }
.inline-form { display: inline; }

/* buttons */
.abtn {
  display: inline-block; padding: 0.6rem 1.2rem; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.03em;
  border: 1.5px solid var(--green); color: var(--green); background: transparent;
  transition: all 0.15s ease; text-align: center;
}
.abtn:hover { background: var(--green); color: var(--white); }
.abtn-primary { background: var(--green); color: var(--white); }
.abtn-primary:hover { background: var(--green-deep); }
.abtn-wide { width: 100%; }
.abtn-small { padding: 0.35rem 0.8rem; font-size: 0.78rem; }
.abtn-danger { border-color: var(--danger); color: var(--danger); }
.abtn-danger:hover { background: var(--danger); color: var(--white); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 2px; }

/* alerts */
.alert { padding: 0.8rem 1.1rem; border-radius: var(--radius); font-size: 0.875rem; font-weight: 500; margin-bottom: 1.25rem; }
.alert-error { background: #f7e3de; color: var(--danger); border: 1px solid #e5b8ac; }
.alert-ok { background: #e4eee2; color: var(--green-deep); border: 1px solid #bed3ba; }

/* login */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; }
.login-card {
  width: 100%; max-width: 400px; background: var(--white);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-md);
  padding: 2.5rem 2.25rem; text-align: center;
}
.login-logo { height: 48px; width: auto; margin: 0 auto 1.5rem; }
.login-card h1 { font-size: 1.6rem; margin-bottom: 0.25rem; }
.login-sub { font-size: 0.875rem; color: var(--muted); margin-bottom: 1.5rem; }
.login-card form { text-align: left; }
.login-back { display: inline-block; margin-top: 1.5rem; font-size: 0.85rem; color: var(--muted); }
.login-back:hover { color: var(--ink); }

/* forms */
.afield { margin-bottom: 1rem; }
.afield label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 0.3rem; }
.afield label small { font-weight: 400; color: var(--muted); }
.afield input, .afield textarea {
  width: 100%; padding: 0.65rem 0.9rem; font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--ivory);
}
.afield input:focus, .afield textarea:focus {
  outline: none; border-color: var(--green); background: var(--white);
  box-shadow: 0 0 0 3px rgba(46, 74, 59, 0.13);
}
.afield input[type="file"] { padding: 0.5rem; background: var(--white); }
.afield textarea { resize: vertical; }
.afield-hint { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.6rem; }
.aform-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.aform-row.three { grid-template-columns: 1fr 1fr 1fr; }
.check-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--ink-soft); margin-top: 0.6rem; }
.check-label input { accent-color: var(--green); width: 16px; height: 16px; }

/* sections & layout */
.admin-section {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.75rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm);
}
.admin-form-actions { display: flex; gap: 0.75rem; margin: 0.5rem 0 2rem; }
.admin-title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.admin-title-row h1 { margin-bottom: 0; }
.admin-crumbs { font-size: 0.85rem; margin-bottom: 0.75rem; }
.admin-crumbs a { color: var(--terracotta); font-weight: 600; }
.admin-empty { background: var(--white); border: 1.5px dashed var(--line); border-radius: 16px; padding: 3rem 1.5rem; text-align: center; color: var(--muted); }
.admin-empty .abtn { margin-top: 1rem; }

/* dashboard */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem; box-shadow: var(--shadow-sm); }
.stat-card strong { font-family: var(--font-display); font-size: 2.2rem; font-weight: 500; color: var(--green); display: block; line-height: 1.1; }
.stat-card span { font-size: 0.82rem; color: var(--muted); }
.stat-card a { display: block; margin-top: 0.6rem; font-size: 0.82rem; font-weight: 600; color: var(--terracotta); }

/* inquiries */
.inquiry-list { display: grid; gap: 1rem; }
.inquiry-item { border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem; background: var(--ivory); }
.inquiry-item.unread { background: var(--white); border-left: 4px solid var(--terracotta); }
.inquiry-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.9rem; }
.inquiry-top a { color: var(--green); font-weight: 500; margin-left: 0.5rem; }
.inquiry-top time { font-size: 0.8rem; color: var(--muted); }
.inquiry-prop { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.4rem; }
.inquiry-msg { margin-top: 0.6rem; font-size: 0.9rem; color: var(--ink-soft); white-space: pre-line; }
.inquiry-actions { display: flex; gap: 0.6rem; margin-top: 0.9rem; }

/* properties table */
.prop-table { display: grid; gap: 0.9rem; }
.prop-row {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 1.1rem; align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 0.9rem 1.1rem;
}
.prop-thumb { width: 96px; height: 68px; object-fit: cover; border-radius: 8px; background: var(--ivory-deep); }
.prop-row-main { display: grid; gap: 0.15rem; }
.prop-row-main span { font-size: 0.83rem; color: var(--muted); }
.prop-row-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.badge {
  font-style: normal; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--ivory-deep); color: var(--green); border-radius: 999px; padding: 0.15rem 0.6rem;
}
.badge-off { background: #f0e0dc; color: var(--danger); }

/* photos in form */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.9rem; margin-bottom: 1rem; }
.photo-tile { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--ivory); cursor: pointer; }
.photo-tile img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.photo-tile span { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; padding: 0.4rem 0.6rem; color: var(--ink-soft); }
.photo-tile input { accent-color: var(--danger); }

@media (max-width: 760px) {
  .aform-row, .aform-row.three, .stat-row { grid-template-columns: 1fr; }
  .prop-row { grid-template-columns: 72px 1fr; }
  .prop-row-actions { grid-column: 1 / -1; }
}
