/* ==========================================================================
   Client area: matches the main site (cream · gold · Cormorant/Montserrat)
   ========================================================================== */
:root {
  --bg: #faf9f7; --bg-alt: #f2f0ec; --card: #fff; --text: #1a1a1a; --muted: #6b6560;
  --accent: #8b6914; --accent-2: #a47d1a; --line: #e0dcd6;
  --ok: #2f7d4f; --ok-bg: #eaf5ee; --bad: #b3261e; --bad-bg: #fbecea; --info-bg: #f6f0e1;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --r: 10px; --shadow: 0 1px 2px rgba(26,26,26,.04), 0 12px 40px -18px rgba(26,26,26,.18);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 300 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 34px; } h2 { font-size: 24px; }
code { font: 12px/1.4 ui-monospace, Menlo, monospace; background: var(--bg-alt); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
img { max-width: 100%; display: block; -webkit-user-drag: none; user-select: none; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .center { text-align: center; } .right { text-align: right; }
.danger, .danger-text { color: var(--bad) !important; }
.eyebrow { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; font-weight: 500; }

/* brand: MICHAEL LOFENFELD photography */
.brand { display: inline-flex; align-items: baseline; gap: .45em; white-space: nowrap; color: var(--text); }
.brand b { font: 600 13px var(--sans); letter-spacing: .3em; }
.brand i { font: italic 300 20px var(--serif); color: var(--accent); letter-spacing: .02em; }
a:hover .brand { text-decoration: none; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 100px;
  border: 1px solid var(--text); background: transparent; color: var(--text); font: 500 12px var(--sans); letter-spacing: .12em;
  text-transform: uppercase; cursor: pointer; transition: all .2s; text-decoration: none !important; white-space: nowrap; }
.btn:hover { background: var(--text); color: #fff; }
.btn--primary { background: var(--text); color: #fff; }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); }
.btn--ghost { border-color: var(--line); }
.btn--ghost:hover { border-color: var(--text); background: var(--text); color: #fff; }
.btn--sm { padding: 7px 14px; font-size: 11px; letter-spacing: .08em; }
.btn--block { width: 100%; padding: 14px; }
.btn.danger:hover { background: var(--bad); border-color: var(--bad); color: #fff !important; }

.form { display: flex; flex-direction: column; gap: 16px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 500; letter-spacing: .04em; color: var(--text); }
label small { font-weight: 300; letter-spacing: 0; }
input, select, textarea { font: 400 15px var(--sans); color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; width: 100%; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,105,20,.12); }
input:disabled { background: var(--bg-alt); color: var(--muted); }
textarea { resize: vertical; font-size: 14px; }
.pw { position: relative; display: block; }
.pw input { padding-right: 96px; }
.pw__toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--bg-alt); color: var(--text);
  font: 500 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 8px 12px; border-radius: 6px; cursor: pointer; }
.pw__toggle:hover { background: var(--line); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.span2 { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin: 0; }
legend { font-size: 12px; font-weight: 500; padding: 0 6px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; font-size: 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 100px; padding: 8px 16px 8px 12px; background: #fff; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.check:has(input:checked) { border-color: var(--accent); background: var(--info-bg); }
.check--switch { align-self: end; border: 0; padding: 12px 0; background: none !important; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.alert { padding: 12px 16px; border-radius: 8px; margin: 0 0 16px; font-size: 14px; border: 1px solid transparent; }
.alert--error { background: var(--bad-bg); color: var(--bad); border-color: #f2c9c5; }
.alert--success { background: var(--ok-bg); color: var(--ok); border-color: #c9e6d3; }
.alert--info { background: var(--info-bg); color: #6b5210; border-color: #eadfbf; }

/* ---------- login ---------- */
.login { flex: 1; display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login__art { position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 56px; color: #fff;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(164,125,26,.55), transparent 55%),
    radial-gradient(ellipse at 90% 90%, rgba(139,105,20,.35), transparent 50%),
    linear-gradient(160deg, #2a2420, #121010 70%); }
.login__art::before { content: ""; position: absolute; inset: 0; opacity: .08;
  background: repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 64px), repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 64px); }
.login__art-inner { position: relative; }
.login__art .eyebrow { color: #e3c77d; }
.login__art h2 { font-size: clamp(40px, 5vw, 68px); font-weight: 300; margin: 0; }
.login__art h2 em { color: #e3c77d; }
.login__panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; gap: 28px; }
.login__brand { display: block; text-align: center; margin-bottom: 4px; }
.login__card { width: 100%; max-width: 420px; }
.login__card h1 { margin-bottom: 4px; }
.login__card .form, .login__card form { display: flex; flex-direction: column; gap: 16px; margin: 22px 0 18px; }
.back { font-size: 13px; color: var(--muted); }
.center-screen { flex: 1; display: grid; place-items: center; padding: 40px 18px; }
.narrow-card { width: 100%; max-width: 460px; }
.narrow-card .login__brand { margin-bottom: 22px; }

/* ---------- top bar & layout ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line); background: rgba(250,249,247,.9); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; }
.topbar__brand { display: flex; align-items: center; gap: 14px; }
.topbar__nav { display: flex; align-items: center; gap: 22px; font-size: 13px; }
.topbar__nav a:not(.btn) { color: var(--text); }
.tag { font: 500 10px var(--sans); letter-spacing: .15em; text-transform: uppercase; background: var(--text); color: #fff; padding: 4px 8px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 44px clamp(18px, 4vw, 40px) 80px; flex: 1; }
.wrap.narrow { max-width: 560px; } .wrap.wide { max-width: 1280px; }
.title { font-size: clamp(34px, 4vw, 48px); font-weight: 300; }
.lead { font-size: 16px; max-width: 620px; margin: 0 0 34px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .title { margin: 4px 0 0; }
.empty { text-align: center; padding: 50px 24px; }

/* ---------- gallery cards ---------- */
.gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; margin-bottom: 30px; }
.gcard { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  color: var(--text); box-shadow: var(--shadow); transition: transform .35s ease, box-shadow .35s ease; text-decoration: none !important; }
a.gcard:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(26,26,26,.45); color: var(--text); }
.gcard__img { position: relative; aspect-ratio: 3 / 2; background: linear-gradient(135deg, #2a2420, #121010); overflow: hidden; }
.gcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; pointer-events: none; }
a.gcard:hover .gcard__img img { transform: scale(1.05); }
.gcard__badge { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.92); color: var(--text); font: 500 11px var(--sans);
  letter-spacing: .06em; padding: 6px 10px; border-radius: 100px; }
.gcard__badge.is-bad { background: var(--bad); color: #fff; }
.gcard__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; }
.gcard__body h2 { margin: 0; font-size: 26px; }
.gcard__body p { margin: 0 0 6px; }
.gcard__cta { font: 500 12px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-top: 6px; }
.gcards--admin { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.inline-edit { display: flex; gap: 8px; margin-bottom: 6px; }
.inline-edit input { flex: 1; min-width: 0; font: 400 22px var(--serif); padding: 6px 10px; border-color: transparent; background: transparent; }
.inline-edit input:hover, .inline-edit input:focus { border-color: var(--line); background: #fff; }

/* ---------- admin ---------- */
.tabs { display: flex; gap: 4px; padding: 0 clamp(18px, 4vw, 48px); border-bottom: 1px solid var(--line); overflow-x: auto; background: var(--bg); }
.tabs a { padding: 14px 16px; color: var(--muted); font-size: 13px; font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--text); }
.tabs a.is-active { color: var(--text); border-bottom-color: var(--accent); }
.tabs small { background: var(--bg-alt); border-radius: 100px; padding: 1px 7px; font-size: 11px; margin-left: 4px; }
.search { width: 240px; padding: 9px 14px; border-radius: 100px; font-size: 13px; }
.table-card { padding: 0; overflow: visible; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 500 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.table th:first-child { border-top-left-radius: 14px; } .table th:last-child { border-top-right-radius: 14px; }
.table td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fcfbf9; }
.chip { display: inline-block; font-size: 12px; background: var(--info-bg); color: #6b5210; padding: 3px 10px; border-radius: 100px; margin: 0 4px 4px 0; }
.note { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--muted); font-style: italic; }
.status { font: 500 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 100px; }
.status--active { background: var(--ok-bg); color: var(--ok); }
.status--disabled { background: var(--bad-bg); color: var(--bad); }
.status--expired { background: #f1eee9; color: var(--muted); }
.actions { white-space: nowrap; }
.menu { display: inline-block; position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu__pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 230px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 20px 50px -15px rgba(0,0,0,.25); padding: 6px; text-align: left; }
.menu__pop form { display: flex; flex-direction: column; }
.menu__pop button, .menu__pop a { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 6px;
  font: 400 13.5px var(--sans); color: var(--text); cursor: pointer; text-decoration: none; }
.menu__pop button:hover, .menu__pop a:hover { background: var(--bg-alt); }
.log--login_failed td, .log--login_locked td, .log--admin_login_failed td { color: var(--bad); }
.log--login_failed td a { color: var(--bad); }
.checks-table td.ck { width: 44px; font-size: 18px; text-align: center; }
.ck.ok { color: var(--ok); } .ck.bad { color: var(--bad); }
.cred { margin-bottom: 26px; border-color: var(--accent); background: linear-gradient(180deg, #fffdf7, #fff); }
.cred__head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.cred__head h2 { margin: 0; }
.cred__boxes { display: flex; gap: 12px; }
.cred__boxes div { background: var(--bg-alt); border-radius: 8px; padding: 10px 16px; }
.cred__boxes small { display: block; font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.cred__boxes code { background: none; padding: 0; font-size: 17px; font-weight: 600; }
.cred textarea { margin: 6px 0 12px; font: 13px/1.5 ui-monospace, Menlo, monospace; background: var(--bg); }

/* ---------- footer ---------- */
.c-foot { display: flex; justify-content: center; align-items: baseline; gap: 18px; flex-wrap: wrap; padding: 26px 20px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); }
.is-login .c-foot { display: none; }
.c-foot .brand b { font-size: 11px; } .c-foot .brand i { font-size: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login__art { min-height: 220px; padding: 32px 24px; }
  .grid2 { grid-template-columns: 1fr; }
  .gcards--admin { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hide-sm { display: none !important; }
  .topbar__nav { gap: 12px; }
  .brand b { font-size: 11px; letter-spacing: .2em; } .brand i { font-size: 17px; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .table td { border: 0; padding: 6px 16px; }
  .right { text-align: left; }
  .search { width: 100%; }
  .card { padding: 20px; }
}
