/* Kat Leong website admin — the Brand Palette (ivory, beige, charcoal, gold, logo red). */
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url(poppins-400.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url(poppins-600.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url(poppins-700.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 800; font-display: swap; src: url(poppins-800.woff2) format("woff2"); }
:root { --ivory: #F8F4EE; --cream: #FAF8F3; --beige: #E9E2D6; --line: #E2D9CA; --grey: #C8C2BA; --ink: #232323; --muted: #6B6158; --gold: #C9A66B; --gold-ink: #8A6A33;
  --red: #AD0711; --red-dark: #7F000C; --green: #2F7A47; --green-bg: #E3EFE5; --amber-bg: #FBF0DA; --amber: #8A5A00; --blue: #3366CC; --card: #FFFFFF;
  --shadow: 0 1px 2px rgba(35,35,35,.05), 0 8px 22px rgba(107,86,69,.09); --font: "Poppins", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ivory); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 24px; font-weight: 800; } h2 { font-size: 19px; font-weight: 700; } h3 { font-size: 16px; font-weight: 700; }
a { color: var(--red); }
.boot { padding: 40px; color: var(--muted); }
.stack { display: grid; gap: 14px; } .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.end { justify-content: flex-end; } .grow { flex: 1; min-width: 0; }
.grid2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.muted { color: var(--muted); } .small { font-size: 13px; } .error { color: var(--red); font-weight: 600; min-height: 0; } .error:empty { display: none; }
.card { background: var(--card); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
label.field { display: block; } label.field > span, .field > .wlabel { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input { font: inherit; width: 100%; padding: 10px 12px; border: 1.5px solid var(--grey); border-radius: 10px; background: #fff; color: var(--ink); min-height: 44px; }
.input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(173,7,17,.12); }
textarea.input { resize: vertical; }
.btn { font: inherit; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; min-height: 44px; border-radius: 999px;
  border: 1.5px solid var(--grey); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink); } .btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; } .btn.go { background: var(--green); border-color: var(--green); color: #fff; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; } .btn.danger { color: var(--red); border-color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; } .btn.ghost:hover { background: var(--beige); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.iconbtn { border: 0; background: transparent; cursor: pointer; color: inherit; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; font-size: 22px; }
.iconbtn:hover { background: var(--beige); }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--beige); color: var(--muted); white-space: nowrap; }
.badge.approved, .badge.ok { background: var(--green-bg); color: var(--green); } .badge.pending, .badge.warn { background: var(--amber-bg); color: var(--amber); }
.badge.bad { background: #FCE8E6; color: var(--red-dark); } .badge.premium { background: var(--gold); color: var(--ink); }
.list { display: grid; gap: 8px; } .li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--cream); border: 1px solid var(--line); }
.li.click { cursor: pointer; } .li.click:hover { border-color: var(--gold); }
.seg { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 12px; background: var(--beige); }
.seg button { font: inherit; font-weight: 600; border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; cursor: pointer; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; opacity: 0; transition: all .2s; pointer-events: none; z-index: 90; max-width: 90vw; font-weight: 600; }
#toast.show { opacity: 1; transform: translateX(-50%); } #toast.good { background: var(--green); } #toast.bad { background: var(--red); }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(35,35,35,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { position: relative; background: var(--ivory); width: 100%; max-width: 640px; max-height: 92dvh; overflow-y: auto; padding: 22px 20px 26px; border-radius: 20px 20px 0 0; }
.sheet.wide { max-width: 1040px; } .sheet .x { position: absolute; right: 10px; top: 10px; }
@media (min-width: 700px) { .modal { align-items: center; } .sheet { border-radius: 20px; } }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login form { width: 100%; max-width: 380px; background: var(--card); border-radius: 20px; padding: 28px 24px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.login img { height: 64px; justify-self: center; } .login h1 { text-align: center; font-size: 20px; }

/* ---------- frame: side panel + page ---------- */
.shell { display: grid; min-height: 100dvh; grid-template-columns: 248px 1fr; }
.side { background: var(--ink); color: #EDE7DE; padding: 18px 12px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; } .side .brand img { height: 40px; background: #fff; border-radius: 8px; padding: 4px 6px; }
.side .brand b { font-size: 13px; line-height: 1.2; }
.side .sect { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); padding: 14px 10px 6px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: #EDE7DE; text-decoration: none; font-weight: 600; font-size: 14px; }
.side a:hover { background: rgba(255,255,255,.08); } .side a.on { background: #fff; color: var(--ink); }
.side a .count { margin-left: auto; background: var(--red); color: #fff; font-size: 12px; border-radius: 999px; padding: 0 8px; }
.side .me { margin-top: auto; padding: 14px 10px 4px; font-size: 13px; color: #BDB4A8; display: grid; gap: 6px; }
.side .me a { padding: 6px 0; font-weight: 500; }
.page { min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 18px 26px; border-bottom: 1px solid var(--line); background: var(--cream); position: sticky; top: 0; z-index: 10; }
.top .sub { font-size: 13px; color: var(--muted); } .top .menu { display: none; }
main.wrap { padding: 22px 26px 60px; max-width: 1180px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .shell.open .side { transform: none; } .shell.open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 30; }
  .top { padding: 12px 14px; } .top .menu { display: inline-flex; } main.wrap { padding: 16px 14px 60px; }
}

/* ---------- members ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { font: inherit; font-weight: 600; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; cursor: pointer; color: var(--muted); }
.tab.on { border-color: var(--ink); background: var(--ink); color: #fff; } .tab b { margin-left: 6px; }
.mrow { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.mrow .who { font-weight: 700; } .mrow .meta { font-size: 13px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; } .kv dt { color: var(--muted); font-size: 13px; } .kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.trail { display: grid; gap: 6px; font-size: 13px; } .trail div { padding-left: 12px; border-left: 3px solid var(--line); }
.pcbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--cream); border: 1px solid var(--line); font-size: 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grey); display: inline-block; } .dot.on { background: var(--green); } .dot.off { background: var(--red); }
.secret { font-family: ui-monospace, Menlo, monospace; background: var(--beige); padding: 10px 12px; border-radius: 10px; word-break: break-all; }

/* ---------- website editor (moved from Kat Leong Inventory) ---------- */
.wsite .wlabel { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.wbi .wpair { display: grid; gap: 8px; } @media (min-width: 760px) { .wbi .wpair { grid-template-columns: 1fr 1fr; } }
.wlang { display: flex; align-items: flex-start; gap: 8px; } .wlang .input { flex: 1; min-width: 0; }
.wtag { flex: none; min-width: 42px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--beige); border-radius: 8px; padding: 6px 4px; margin-top: 8px; }
.wcheck { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; min-height: 40px; } .wcheck input { width: 20px; height: 20px; accent-color: var(--red); }
.wphoto { display: flex; gap: 14px; align-items: center; }
.wphoto img, .wnophoto { width: 120px; height: 90px; object-fit: contain; background: var(--beige); border: 1px solid var(--line); border-radius: 12px; flex: none; }
.wnophoto { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.witem { gap: 12px; } .wbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 4px; }
.wbar .iconbtn { width: 36px; height: 36px; border: 1px solid var(--line); background: #fff; font-size: 16px; } .wbar .iconbtn:disabled { opacity: .35; cursor: default; }
.wsub { display: grid; gap: 10px; } .wsub .wphoto img, .wsub .wnophoto { width: 84px; height: 64px; }
.whours { display: grid; gap: 8px; } .wday { display: grid; grid-template-columns: 110px auto 1fr auto 1fr; align-items: center; gap: 8px; } .wday .input { min-width: 0; }
@media (max-width: 520px) { .wday { grid-template-columns: 1fr auto; } .wday > span.muted { display: none; } }
.wsave { position: sticky; top: 72px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); }
.wwarn { color: var(--red); font-weight: 700; }
.wgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); max-height: 60vh; overflow-y: auto; }
.wgrid.big { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); max-height: none; overflow: visible; }
.wthumb { display: grid; gap: 4px; padding: 6px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; text-align: left; } .wthumb:hover { border-color: var(--gold); }
.wthumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--beige); border-radius: 8px; }
.wthumb span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wpcard { gap: 8px; } .wpcard img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--beige); border-radius: 10px; }
.wstatus { border-left: 6px solid var(--line); } .wstatus.warn { border-left-color: var(--gold); background: var(--amber-bg); } .wstatus.ok { border-left-color: var(--green); }
.wlinks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.wlink { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; background: #fff; } .wlink:hover { border-color: var(--gold); }
.wprevbar { flex-wrap: wrap; gap: 8px; }
.wframebox { display: flex; justify-content: center; background: var(--beige); border-radius: 12px; padding: 8px; } .wframe { height: 70vh; border: 0; border-radius: 8px; background: #fff; max-width: 100%; }
.wmore summary { cursor: pointer; font-weight: 600; color: var(--muted); padding: 6px 0; }
.pubpages { display: grid; gap: 8px; } .pubpages label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--cream); border: 1px solid var(--line); font-weight: 600; cursor: pointer; }
.pubpages input { width: 20px; height: 20px; accent-color: var(--red); }
