/* ── Reunited Roleplay UCP — light theme ─────────────────────────────────────
   Flat design. No gradients. Single blue accent. */

:root {
  --bg:           #e9ecef;
  --surface:      #ffffff;
  --surface-2:    #f6f7f9;
  --text:         #1f2430;
  --muted:        #6b7280;
  --border:       #e2e5ea;
  --border-2:     #d7dbe0;
  --primary:      #f9aa01;   /* brand gold — used for fills/buttons */
  --primary-700:  #d98f00;   /* darker gold — hover */
  --primary-ink:  #9a6c00;   /* deep gold — readable text/links on white */
  --on-primary:   #1a1d24;   /* dark text on a gold fill */
  --primary-tint: #fff7e6;   /* pale gold — active/selected backgrounds */
  --primary-tint-border: #ffe2a8;
  --danger:       #dc2626;
  --danger-700:   #b91c1c;
  --ok:           #16a34a;
  --warn:         #d97706;
  --radius:       8px;
  --radius-sm:    6px;
  --shadow:       0 1px 2px rgba(16,24,40,.06), 0 8px 24px rgba(16,24,40,.06);
  --shadow-sm:    0 1px 2px rgba(16,24,40,.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--primary-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  font: inherit; font-weight: 500;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-700); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-700); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-row { display: flex; gap: 10px; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 500; color: #374151; }
.field-hint { font-size: 12px; color: var(--muted); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-sub { font-size: 13px; font-weight: 600; color: #374151; margin: 0 0 2px; }
.inline-form { gap: 8px; }

input[type=text], input[type=email], input[type=password], input[type=number],
select, textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249,170,1,.22);
}
textarea { resize: vertical; }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #374151; cursor: pointer; }
.check-block { padding: 6px 0; }
.check input { width: auto; }

.link { font-size: 13px; }
.sep { border: none; border-top: 1px solid var(--border); margin: 18px 0; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert { padding: 10px 13px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; border: 1px solid transparent; }
.alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-ok    { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }

/* ── Auth (split card) ───────────────────────────────────────────────────── */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.auth-wrap { width: 100%; max-width: 760px; padding: 24px; }
.auth-card {
  display: grid; grid-template-columns: 5fr 6fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 440px;
}
.auth-aside {
  background: #1f2430;          /* flat panel — drop a photo in here later if desired */
  background-size: cover; background-position: center;
}
.auth-aside-inner { height: 100%; display: flex; align-items: flex-end; padding: 22px; }
.auth-brand { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .2px; }
.auth-form { padding: 38px 40px; display: flex; flex-direction: column; justify-content: center; }
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head h1 { font-size: 22px; }
.auth-sub { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.auth-text { font-size: 13.5px; color: #374151; margin: 0 0 18px; text-align: center; }
.auth-alt { text-align: center; font-size: 13px; color: var(--muted); margin: 18px 0 0; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 16px; }
.cf-turnstile { margin: 2px 0; }

.plain-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 40px; max-width: 440px; width: 100%; text-align: center;
}
.error-page { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.error-code { font-size: 44px; font-weight: 700; color: var(--primary-ink); }
.error-msg { color: var(--muted); margin: 0; }

/* ── App shell ───────────────────────────────────────────────────────────── */
.app-body { display: flex; min-height: 100vh; }
.nav-toggle { display: none; }

.sidebar {
  width: 232px; flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 18px 14px;
}
.sidebar-brand { font-weight: 700; font-size: 15px; padding: 6px 10px 18px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: block; padding: 9px 12px; border-radius: var(--radius-sm);
  color: #374151; font-weight: 500; font-size: 13.5px;
}
.nav-link:hover { background: var(--surface-2); text-decoration: none; }
.nav-link.is-active { background: var(--primary-tint); color: var(--primary-ink); }
.nav-link.is-disabled { color: #9ca3af; cursor: default; }
.nav-link.is-disabled small { color: #c0c4cc; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  height: 58px; padding: 0 22px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar-title { font-weight: 600; font-size: 15px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.pill {
  font-size: 12px; color: #374151;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 999px;
}
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.avatar-sm { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.avatar-lg { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; display: block; margin-bottom: 8px; }
.inline { display: inline; }

.content { padding: 22px; max-width: 1080px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }

/* ── Cards / grid ────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 18px 20px;
}
.card-narrow { max-width: 520px; }
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head .card-title { margin-bottom: 0; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.page-head { display: flex; align-items: center; justify-content: space-between; }
.page-title { font-size: 20px; }

/* stat cards */
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.stat-cta { align-self: flex-start; margin-top: 6px; }

/* key/value list */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 500; }
.kv-tight { gap: 6px 14px; }

/* banner (next-step) */
.banner {
  display: flex; align-items: center; gap: 14px;
  background: var(--primary-tint); border: 1px solid var(--primary-tint-border); color: #8a5a00;
  padding: 12px 16px; border-radius: var(--radius); font-size: 13.5px;
}
.banner span { flex: 1; }

/* dots */
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-on { background: var(--ok); }
.dot-off { background: #cbd1d9; }

/* characters */
.char-card { display: flex; flex-direction: column; gap: 12px; }
.char-card-head { display: flex; align-items: center; gap: 8px; }
.char-name { font-size: 15px; }
.char-card-foot { margin-top: auto; }
.char-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--muted); border: 1px dashed var(--border-2);
  box-shadow: none; min-height: 150px; font-size: 13.5px;
}
.char-empty:hover { background: var(--surface-2); text-decoration: none; border-color: var(--primary); color: var(--primary-ink); }
.char-empty-plus { font-size: 26px; line-height: 1; }
.char-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.char-mini li { display: flex; align-items: center; gap: 8px; }

/* news */
.news { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.news li { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.news li:last-child { border-bottom: none; padding-bottom: 0; }
.news-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.news-title { font-weight: 600; }
.news-date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.news-body { margin: 4px 0 0; color: #374151; }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.table tr:last-child td { border-bottom: none; }

/* badges */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.badge-ok { background: #f0fdf4; color: #166534; }
.badge-warn { background: #fffbeb; color: var(--warn); }
.badge-danger { background: #fef2f2; color: #991b1b; }

.status-line { font-size: 14px; margin: 0 0 12px; }
.note { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-top: 12px; font-size: 13.5px; }

/* danger zone */
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-color: #f3d3d3; }

/* burger (mobile) */
.nav-burger { display: none; flex-direction: column; gap: 4px; cursor: pointer; }
.nav-burger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .auth-card { grid-template-columns: 1fr; min-height: 0; }
  .auth-aside { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }

  .nav-burger { display: flex; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 30;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .nav-toggle:checked ~ .sidebar { transform: translateX(0); box-shadow: var(--shadow); }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .topbar-right .pill { display: none; }
}
