/* Admin dashboard · styles (moved out of admin.html) */
:root {
  --bg:#0a0908; --surface:#15120f; --surface-2:#1e1a17; --gold:#b8894a; --gold-lt:#d4a96a;
  --text:#f2ede4; --muted:#8a837c; --line:rgba(184,137,74,.22); --danger:#d9776b; --ok:#8fbf8a; --radius:4px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: 'Jost', sans-serif; font-weight: 400; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold-lt); }
.serif { font-family: 'Cormorant Garamond', serif; font-weight: 500; }

/* Login */
.login { max-width: 360px; margin: 12vh auto 0; padding: 0 16px; text-align: center; }
.login h1 { font-size: 40px; }
.login-home { position: fixed; top: 20px; left: 20px; color: var(--gold-lt); text-decoration: none; font-size: 13px;
  border: 1px solid var(--line); border-radius: 4px; padding: 7px 14px; }
.login-home:hover { border-color: var(--gold); }
.login h1 em { color: var(--gold-lt); }
.login p { color: var(--muted); font-size: 14px; margin: 6px 0 24px; }
.login form { display: grid; gap: 12px; text-align: left; }
label.field { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
input.in, select.in, textarea.in {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; outline: none;
}
input.in:focus, select.in:focus, textarea.in:focus { border-color: var(--gold); }
textarea.in { resize: vertical; min-height: 64px; line-height: 1.45; }
.btn {
  background: var(--gold); color: #0a0908; border: none; border-radius: var(--radius);
  padding: 10px 18px; font-weight: 500; cursor: pointer;
}
.btn:hover { background: var(--gold-lt); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: none; color: var(--gold-lt); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--gold); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.danger { background: none; color: var(--danger); border: 1px solid rgba(217,119,107,.35); }
.error { color: var(--danger); font-size: 13px; min-height: 18px; }

/* Shell */
.top {
  display: flex; align-items: center; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(10,9,8,.95); backdrop-filter: blur(6px); z-index: 5;
}
.top .brand { font-size: 26px; color: var(--text); text-decoration: none; }
.top .brand:hover em { color: var(--gold); }
.top .brand em { color: var(--gold-lt); }
.top .spacer { flex: 1; }
.top a.site { font-size: 13px; text-decoration: none; }
.tabs { display: flex; gap: 4px; padding: 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab {
  background: none; border: none; color: var(--muted); padding: 14px 14px 12px; cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap; font-size: 14px;
}
.tab.on { color: var(--gold-lt); border-bottom-color: var(--gold); }
.tab .count { background: var(--gold); color: #0a0908; border-radius: 10px; font-size: 11px; padding: 1px 7px; margin-left: 6px; }
main { max-width: 1200px; margin: 0 auto; padding: 24px 24px 64px; }
h2 { font-size: 30px; margin-bottom: 4px; }
.lead { color: var(--muted); font-size: 14px; margin-bottom: 20px; max-width: 760px; line-height: 1.5; }
.msg { color: var(--muted); padding: 24px 0; }

/* Overview */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .n { font-family: 'Cormorant Garamond', serif; font-size: 40px; color: var(--gold-lt); line-height: 1.1; }
.stat .l { font-size: 13px; color: var(--muted); }
.stat button { margin-top: 8px; }
.panel-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-top: 18px; }
.panel-card h3 { font-size: 24px; margin-bottom: 2px; }
.panel-card .lead { margin: 6px 0 12px; }
.panel-card td:not(:first-child), .panel-card th:not(:first-child) { text-align: right; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.link-row .btn { text-decoration: none; }
.link-group { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 12px 0 6px; }
.price-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.price-row input { width: 110px; }
.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 10px; }
@media (max-width: 700px) { .social-grid { grid-template-columns: 1fr; } }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.hero-slot { display: grid; gap: 8px; font-size: 13px; }
.hero-pic { aspect-ratio: 16/10; background: var(--surface-2) center/cover no-repeat; border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; color: var(--muted); }
.move-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero-pic { position: relative; }
.builtin-tag { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 10px; }
.drag-hint { font-size: 11px; color: var(--muted); flex: 1; text-align: center; }
.upload-row { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr auto; gap: 8px; }
@media (max-width: 800px) { .upload-row { grid-template-columns: 1fr; } }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.photo-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; display: grid; gap: 6px; cursor: grab; }
.photo-card .thumb { aspect-ratio: 1/1; border-radius: 3px; }
.photo-card .in { font-size: 12.5px; padding: 6px 8px; }
.photo-card.dragging, .card.dragging { opacity: .4; }
.photo-card.hidden-photo { opacity: .45; }
.card[draggable=true] { cursor: grab; }
.card .move-row { padding: 0 12px 8px; }
.picker { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.picker-box { background: var(--surface); border: 1px solid var(--gold); border-radius: var(--radius); padding: 16px; width: min(1000px, 100%); max-height: 85vh; overflow: auto; display: grid; gap: 12px; }
.picker-box .move-row { justify-content: space-between; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.picker-item { aspect-ratio: 1/1; border: 2px solid transparent; border-radius: 3px; background: center/cover no-repeat; cursor: pointer; }
.picker-item:hover { border-color: var(--gold); }
.counter-card {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
  background: linear-gradient(135deg, rgba(184,137,74,.14), rgba(184,137,74,.03));
  border: 1px solid var(--gold); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 18px;
}
.counter-card .n { font-family: 'Cormorant Garamond', serif; font-size: 64px; color: var(--gold-lt); line-height: 1; }
.counter-card .l { font-size: 13px; color: var(--muted); line-height: 1.5; }
.counter-controls { display: grid; gap: 10px; }
.switch { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.switch input { width: 18px; height: 18px; accent-color: var(--gold); }
.counter-fix { display: flex; gap: 8px; max-width: 320px; }
.counter-fix .btn { white-space: nowrap; }
@media (max-width: 700px) { .counter-card { grid-template-columns: 1fr; } }

/* Inquiries */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 20px; padding: 6px 14px; cursor: pointer; font-size: 13px; }
.chip.on { color: #0a0908; background: var(--gold); border-color: var(--gold); }
.inq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.inq.status-NEW { border-left: 3px solid var(--gold); }
.inq-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.inq-head .name { font-size: 18px; font-weight: 500; }
.inq-head .when { color: var(--muted); font-size: 12px; margin-left: auto; }
.inq-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.inq-meta b { color: var(--text); font-weight: 400; }
.inq-msg { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; background: var(--surface-2); padding: 10px 12px; border-radius: var(--radius); max-height: 260px; overflow: auto; }
.inq-actions { display: grid; grid-template-columns: 180px 1fr auto; gap: 10px; margin-top: 12px; align-items: start; }
.inq-actions textarea { min-height: 40px; }
.inq-mockup { margin-top: 10px; }
.inq-mockup img { max-width: 420px; width: 100%; border-radius: var(--radius); display: block; margin-top: 8px; }
.saved { color: var(--ok); font-size: 12px; }
@media (max-width: 700px) { .inq-actions { grid-template-columns: 1fr; } }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 400; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.yes { color: var(--gold-lt); }

/* Showcase */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.thumb { aspect-ratio: 1/1; background: var(--surface-2) center / cover no-repeat; }
.info { padding: 10px 12px; font-size: 12.5px; color: var(--muted); flex: 1; }
.info ul { padding-left: 16px; color: var(--text); margin-bottom: 6px; }
.check { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }
.off { color: var(--muted); font-size: 12px; padding: 10px 12px; border-top: 1px solid var(--line); }
.real-row { display: flex; gap: 8px; align-items: center; padding: 0 12px 12px; }
.real-row select { font-size: 13px; padding: 7px 8px; }
.real-row img { width: 40px; height: 40px; object-fit: cover; border-radius: 3px; }
.real-row img[hidden] { display: none; }

/* Packages */
.pkg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.pkg.inactive { opacity: .6; }
.pkg-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.pkg-grid .wide { grid-column: 1 / -1; }
.pkg-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.pkg-foot label { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.pkg-foot input[type=checkbox] { accent-color: var(--gold); width: 16px; height: 16px; }
@media (max-width: 700px) { .pkg-grid { grid-template-columns: 1fr; } }

/* Quotes on inquiries */
.quote-box { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; display: grid; gap: 8px; }
.quote-box ul { padding-left: 18px; font-size: 13.5px; }
.quote-note { color: var(--muted); font-size: 13px; white-space: pre-wrap; }
.quote-rows { display: grid; gap: 6px; }
.quote-row { display: grid; grid-template-columns: 1fr auto 110px auto; gap: 6px; align-items: center; }
.q-dollar { color: var(--muted); }
.quote-foot { display: flex; justify-content: space-between; align-items: center; }
.quote-total { font-family: 'Cormorant Garamond', serif; font-size: 22px; color: var(--gold-lt); }
.quote-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.quote-hint { color: var(--muted); font-size: 12px; }

/* Site health */
.problem { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
.problem-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.problem-head strong { font-weight: 500; flex: 1; min-width: 200px; word-break: break-word; }
.problem-kind { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; border-radius: 3px; padding: 2px 7px; }
.problem-kind.browser { background: rgba(156,200,236,.15); color: #9cc8ec; }
.problem-kind.server { background: rgba(224,138,126,.15); color: #e08a7e; }
.problem-count { font-size: 12px; color: var(--gold-lt); }
.problem-meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.problem details { margin-top: 6px; font-size: 12px; color: var(--muted); }
.problem pre { white-space: pre-wrap; word-break: break-word; font-size: 11.5px; margin-top: 6px; color: var(--text); max-height: 240px; overflow: auto; }

/* iPhones zoom in when a text box's text is under 16px, pushing the page off screen. 16px on touch screens prevents it. */
@media (pointer: coarse) { input, select, textarea { font-size: 16px !important; } }
