/* Golf Plus admin page (BRIEF 3.A2 A2-4) - the partner page design (Sky & Navy, white, Golffy), wider for a computer
   and easy to use rather than decorated. Fonts are hosted here (assets/fonts, SIL OFL - see OFL.txt). */
@font-face { font-family: "Prompt"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/prompt-400.woff2") format("woff2"); }
@font-face { font-family: "Prompt"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("assets/fonts/prompt-600.woff2") format("woff2"); }

:root {
  --navy: #1B2F6B; --blue: #2F5BD3; --blue-soft: #E4ECFB; --bg: #F3F6FC; --card: #FFFFFF; --text: #1d2433;
  --muted: #5b6478; --error: #b3261e; --ok: #1f7a4d; --warn: #7a4b00; --radius: 16px;
  --shadow: 0 2px 10px rgba(27, 47, 107, 0.08); --tap: 44px;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55;
  font-family: "Prompt", system-ui, -apple-system, "Segoe UI", "Noto Sans Thai", sans-serif; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; }

.topbar { background: var(--card); box-shadow: var(--shadow); padding: 0.6rem 1rem; display: flex; align-items: center;
  justify-content: center; gap: 0.5rem; }
.logo { display: block; width: 8rem; height: auto; }
.badge { background: var(--navy); color: #fff; border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.8rem; font-weight: 600; }

main { max-width: 56rem; margin: 0 auto; padding: 1rem 1rem 3rem; }
h2 { font-size: 1.2rem; font-weight: 600; color: var(--navy); margin: 0 0 0.5rem; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; margin: 0 0 1rem; }
.center { text-align: center; }
.mascot { display: block; height: auto; width: 7rem; margin: 0 auto 0.5rem; }
.status-text, .hint { color: var(--muted); margin: 0.25rem 0; }

.who { display: flex; align-items: center; justify-content: space-between; }
.who p { margin: 0; }
.who-name { font-weight: 600; color: var(--navy); }
.role-chip, .status-chip { display: inline-block; background: var(--blue-soft); color: var(--navy); border-radius: 999px;
  padding: 0.05rem 0.6rem; font-size: 0.85rem; font-weight: 600; margin: 0; }
.status-chip.DRAFT { background: #fff4e5; color: var(--warn); }
.status-chip.PUBLISHED { background: #e7f4ec; color: var(--ok); }
.status-chip.ARCHIVED { background: #eceff4; color: var(--muted); }

.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; }
.tabs .tab { width: auto; margin: 0; padding: 0.4rem 1rem; background: #fff; color: var(--blue); border: 2px solid var(--blue); }
.tabs .tab.active { background: var(--blue); color: #fff; }

label { display: block; font-weight: 600; margin-top: 0.8rem; }
input[type="text"], input[type="number"], input[type="datetime-local"], select, textarea {
  width: 100%; min-height: var(--tap); margin-top: 0.3rem; padding: 0.5rem 0.7rem; font: inherit;
  border: 2px solid #d6deef; border-radius: 10px; background: #fff; }
input:disabled, select:disabled, textarea:disabled { background: #f1f3f8; color: var(--muted); }
input:focus, select:focus, textarea:focus, button:focus { outline: 3px solid #9db7f2; outline-offset: 2px; }

button { display: block; width: 100%; min-height: var(--tap); margin-top: 0.75rem; padding: 0.6rem; font: inherit;
  font-weight: 600; color: #fff; background: var(--blue); border: 0; border-radius: 999px; cursor: pointer; }
button:disabled { background: #a7b3cf; cursor: default; }
button.secondary-blue { background: #fff; color: var(--blue); border: 2px solid var(--blue); }
button.danger { background: #fff; color: var(--error); border: 2px solid var(--error); }
button.link { width: auto; background: transparent; color: var(--blue); padding: 0.4rem 0.6rem; margin: 0; }

.message { padding: 0.7rem 1rem; border-radius: 12px; margin: 0.5rem 0; }
.message.error { background: #fdecea; color: var(--error); }
.message.notice { background: #fff4e5; color: var(--warn); }
.message.success { background: #e7f4ec; color: var(--ok); font-weight: 600; }

.list { margin-top: 0.75rem; }
.row { display: flex; align-items: center; gap: 0.75rem; width: 100%; text-align: left; background: #fff; color: var(--text);
  border: 0; border-top: 1px solid #e5eaf5; border-radius: 0; margin: 0; padding: 0.6rem 0.2rem; font-weight: 400; }
.row .thumb { width: 6rem; height: auto; border-radius: 8px; flex: none; background: var(--blue-soft); }
.row .title { font-weight: 600; color: var(--navy); }
.row .meta { color: var(--muted); font-size: 0.9rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.row-actions button { width: auto; margin: 0; padding: 0.3rem 0.8rem; }

.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0 1rem; }
.fields h3 { grid-column: 1 / -1; margin: 1rem 0 0; font-size: 1rem; color: var(--navy); }
.field-error { color: var(--error); font-size: 0.85rem; margin: 0.2rem 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.actions button { width: auto; padding: 0.6rem 1.2rem; }

.preview { border: 2px dashed #d6deef; border-radius: var(--radius); padding: 0.75rem; margin-top: 1rem; max-width: 22rem; }
.preview img { width: 100%; height: auto; border-radius: 10px; display: block; }
.preview .p-name { font-weight: 600; color: var(--navy); margin: 0.4rem 0 0; }
.preview .p-label { display: inline-block; background: var(--blue); color: #fff; border-radius: 999px;
  padding: 0 0.6rem; font-size: 0.85rem; margin: 0.2rem 0; }
.preview .p-desc { color: var(--muted); margin: 0; font-size: 0.9rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.75rem; margin-top: 0.75rem; }
.tile { border: 1px solid #e5eaf5; border-radius: 12px; padding: 0.4rem; }
.tile img { width: 100%; height: auto; border-radius: 8px; display: block; }
.tile .meta { color: var(--muted); font-size: 0.8rem; word-break: break-all; }

.invite { margin-top: 0.75rem; }
.dialog { border: 2px solid var(--blue); position: sticky; bottom: 1rem; }
.dialog-buttons { display: grid; gap: 0.25rem; }
.audit-item { border-top: 1px solid #e5eaf5; padding: 0.4rem 0; font-size: 0.9rem; }
.audit-item .meta { color: var(--muted); }
