/* Peppy theme — sign-in page and admin portal. Dark, cream type, warm sand accent (from the logo). */
:root {
  --z-bg: #070608; --z-panel: #111013; --z-panel-2: #18161A; --z-line: #26232A; --z-line-2: #34303A;
  --z-text: #F6F1E6; --z-text-2: #BDB6A8; --z-muted: #7F796F;
  --z-sand: #EBD9B4; --z-sand-ink: #1A1408; --z-red: #FF7A6B; --z-green: #8FD9A8;
  --z-r: 14px; --z-r-sm: 9px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--z-bg); color: var(--z-text); font: 14px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--z-sand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }

/* inputs + buttons */
.z-field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--z-text-2); }
.z-field input, .z-field select, .z-input {
  height: 42px; border-radius: var(--z-r-sm); border: 1px solid var(--z-line-2); background: var(--z-panel-2); color: var(--z-text);
  padding: 0 13px; font: inherit; font-size: 14px; font-weight: 500; outline: none; transition: border-color .15s, box-shadow .15s;
}
.z-field input:focus, .z-field select:focus, .z-input:focus { border-color: var(--z-sand); box-shadow: 0 0 0 3px rgba(235, 217, 180, .15); }
.z-field input[type=file] { padding: 9px 12px; height: auto; }
.z-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--z-line-2); background: transparent; color: var(--z-text); font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; white-space: nowrap;
}
.z-btn:hover { border-color: var(--z-text-2); text-decoration: none; }
.z-btn.primary { background: var(--z-sand); border-color: var(--z-sand); color: var(--z-sand-ink); }
.z-btn.primary:hover { filter: brightness(1.06); }
.z-btn.danger { color: var(--z-red); border-color: rgba(255, 122, 107, .35); }
.z-btn.sm { height: 32px; padding: 0 13px; font-size: 12.5px; }
.z-flash { padding: 11px 14px; border-radius: var(--z-r-sm); margin-bottom: 14px; font-weight: 600; font-size: 13.5px; }
.z-flash.ok { background: rgba(143, 217, 168, .1); color: var(--z-green); border: 1px solid rgba(143, 217, 168, .25); }
.z-flash.error { background: rgba(255, 122, 107, .1); color: var(--z-red); border: 1px solid rgba(255, 122, 107, .3); }

/* sign-in */
.z-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(900px 500px at 15% -10%, rgba(235, 217, 180, .10), transparent 60%), radial-gradient(700px 500px at 110% 110%, rgba(235, 217, 180, .06), transparent 60%), var(--z-bg); }
.z-auth-card { width: 100%; max-width: 400px; background: var(--z-panel); border: 1px solid var(--z-line); border-radius: 20px; padding: 34px 30px 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.z-auth-logo { height: 26px; width: auto; display: block; margin-bottom: 28px; }
.z-auth h1 { font-size: 24px; font-weight: 800; }
.z-auth .sub { color: var(--z-text-2); margin: 6px 0 24px; font-size: 13.5px; }
.z-auth form { display: flex; flex-direction: column; gap: 14px; }
.z-auth .z-btn { height: 44px; margin-top: 6px; }
.z-auth .foot { margin-top: 22px; font-size: 12px; color: var(--z-muted); text-align: center; }

/* admin shell */
.z-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.z-side { border-right: 1px solid var(--z-line); padding: 24px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.z-side .logo { height: 20px; width: auto; margin: 2px 10px 6px; align-self: flex-start; }
.z-side .tag { margin: 0 10px 22px; font-size: 11px; font-weight: 700; color: var(--z-sand); letter-spacing: .08em; text-transform: uppercase; }
.z-nav { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--z-r-sm); color: var(--z-text-2); font-weight: 600; }
.z-nav:hover { background: var(--z-panel-2); color: var(--z-text); text-decoration: none; }
.z-nav.on { background: var(--z-panel-2); color: var(--z-text); }
.z-nav svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.z-side .bottom { margin-top: auto; border-top: 1px solid var(--z-line); padding-top: 14px; }
.z-side .me { padding: 0 12px 10px; font-size: 12.5px; font-weight: 700; }
.z-side .me span { display: block; color: var(--z-muted); font-weight: 600; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.z-main { padding: 34px 40px 60px; max-width: 1180px; width: 100%; }
.z-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.z-head h1 { font-size: 28px; font-weight: 800; }
.z-head .meta { color: var(--z-muted); font-weight: 600; padding-bottom: 4px; }
.z-head .right { margin-left: auto; display: flex; gap: 8px; }
.z-crumb { color: var(--z-muted); font-weight: 600; font-size: 13px; margin-bottom: 8px; display: inline-block; }
.z-card { background: var(--z-panel); border: 1px solid var(--z-line); border-radius: var(--z-r); margin-bottom: 18px; overflow: hidden; }
.z-card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--z-line); }
.z-card-head h2 { font-size: 15px; font-weight: 800; }
.z-card-head .meta { color: var(--z-muted); font-size: 12.5px; font-weight: 600; }
.z-card-head .right { margin-left: auto; }
.z-card-body { padding: 20px; }
.z-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; align-items: end; }
.z-form .wide { grid-column: 1 / -1; }
.z-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.z-check { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--z-line-2); border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--z-text-2); cursor: pointer; user-select: none; }
.z-check:has(input:checked) { border-color: var(--z-sand); color: var(--z-text); background: rgba(235, 217, 180, .08); }
.z-check input { accent-color: #EBD9B4; margin: 0; }
.z-note { color: var(--z-muted); font-size: 12.5px; margin-top: 10px; }

table.z-table { width: 100%; border-collapse: collapse; }
.z-table th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--z-muted); text-transform: uppercase; letter-spacing: .05em; padding: 11px 20px; border-bottom: 1px solid var(--z-line); }
.z-table td { padding: 13px 20px; border-bottom: 1px solid var(--z-line); vertical-align: middle; }
.z-table tr:last-child td { border-bottom: 0; }
.z-table tbody tr:hover td { background: rgba(255, 255, 255, .015); }
.z-table .n { text-align: right; white-space: nowrap; }
.z-table .muted, .muted { color: var(--z-muted); }
.z-brandcell { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.z-logo-box { width: 40px; height: 40px; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.z-logo-box img { max-width: 34px; max-height: 34px; object-fit: contain; }
.z-logo-box.empty { background: var(--z-panel-2); color: var(--z-sand); font-weight: 800; font-size: 15px; border: 1px solid var(--z-line-2); }
.z-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--z-panel-2); color: var(--z-text-2); border: 1px solid var(--z-line-2); }
.z-pill.on { color: var(--z-green); border-color: rgba(143, 217, 168, .3); background: rgba(143, 217, 168, .08); }
.z-pill.off { color: var(--z-red); border-color: rgba(255, 122, 107, .3); background: rgba(255, 122, 107, .08); }
.z-pill.role { color: var(--z-sand); border-color: rgba(235, 217, 180, .3); background: rgba(235, 217, 180, .07); }
.z-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.z-stat { background: var(--z-panel); border: 1px solid var(--z-line); border-radius: var(--z-r); padding: 16px 18px; }
.z-stat .k { color: var(--z-muted); font-size: 12px; font-weight: 700; }
.z-stat .v { font-size: 26px; font-weight: 800; margin-top: 4px; }
details.z-edit summary { list-style: none; cursor: pointer; }
details.z-edit summary::-webkit-details-marker { display: none; }
details.z-edit[open] { background: var(--z-panel-2); }
.z-edit-body { padding: 4px 20px 20px; }
.z-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 860px) {
  .z-shell { grid-template-columns: 1fr; }
  .z-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--z-line); }
  .z-side .tag { display: none; }
  .z-side .logo { margin: 0 10px 0 0; }
  .z-side .bottom { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; align-items: center; }
  .z-side .me { display: none; }
  .z-main { padding: 22px 16px 48px; }
  .z-table th:nth-child(n+4), .z-table td:nth-child(n+4) { display: none; }
  .z-table td, .z-table th { padding: 11px 14px; }
}

.z-pill.soon { color: #F2C14E; border-color: rgba(242, 193, 78, .35); background: rgba(242, 193, 78, .08); }

.undo-form { margin-top: 4px; }
.linkish { background: none; border: 0; padding: 0; color: var(--z-red); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* Terms / Privacy pages */
.z-legal { max-width: 760px; margin: 0 auto; padding: 48px 16px 64px; line-height: 1.65; color: var(--z-text-2); font-size: 14.5px; }
.z-legal h1 { color: var(--z-text); font-size: 30px; font-weight: 800; margin: 0; }
.z-legal .meta { color: var(--z-muted); margin: 6px 0 28px; font-size: 13px; }
.z-legal h2 { color: var(--z-text); font-size: 17px; font-weight: 700; margin: 30px 0 8px; }
.z-legal b { color: var(--z-text); }
.z-legal ul { padding-left: 20px; margin: 8px 0; }
.z-legal li { margin: 5px 0; }
.z-legal a { color: var(--z-sand); }
.z-legal .foot { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--z-line); font-size: 13px; color: var(--z-muted); }
.z-auth .foot a { color: var(--z-muted); }
