:root {
  --bg: #0c1017;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-dark: rgba(13, 19, 29, 0.88);
  --text: #112031;
  --text-light: #f6f7eb;
  --muted: #728499;
  --line: rgba(17, 32, 49, 0.12);
  --accent: #f95738;
  --accent-2: #ffb627;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  background: linear-gradient(135deg, #0a0d14 0%, #102033 52%, #09131d 100%);
  color: var(--text-light);
}
.page-shell { padding: 28px 18px 40px; }
.panel, .hero {
  max-width: 1180px;
  margin: 0 auto;
  border-radius: 28px;
  padding: 28px;
}
.wide-panel { max-width: 80vw; }
.hero {
  background: var(--panel-dark);
  color: var(--text-light);
  border: 1px solid rgba(255,255,255,0.12);
}
.panel {
  background: var(--panel);
  color: var(--text);
}
.page-grid { max-width: 1180px; margin: 0 auto; display: grid; gap: 20px; }
.top-bar { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: .72rem; color: var(--accent-2); margin:0 0 10px; }
h1,h2,h3,p { margin-top:0; }
.lead { max-width: 48ch; color: inherit; }
.button, button {
  display:inline-flex; align-items:center; justify-content:center;
  min-height:48px; padding:0 18px; border-radius:999px; border:0;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color:#111; font-weight:700; text-decoration:none; cursor:pointer;
}
.button.secondary, button.secondary {
  background: transparent; color: var(--text); border: 1px solid var(--line);
}
label { display:block; font-size:.94rem; font-weight:700; }
input, select {
  width:100%; min-height:48px; padding:12px 14px; border-radius:16px;
  border:1px solid var(--line); background:#fff; font:inherit; color:var(--text);
}
.stack-form { display:grid; gap:10px; }
.event-create-form { gap: 18px; }
.mobile-card-list { display: none; }
.mobile-card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.78);
  padding: 14px;
  color: var(--text);
}
.mobile-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.mobile-card-action {
  margin-top: 12px;
  width: 100%;
}
.wide-form-stack {
  max-width: 900px;
}
.dj-edit-list {
  display: grid;
  gap: 18px;
}
.dj-edit-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}
.form-grid-span { grid-column: 1 / -1; }
.status, .muted { color: var(--muted); min-height:1.4em; }
.home-cards { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:18px; }
.home-cards-three { grid-template-columns: repeat(3, minmax(240px, 1fr)); }
.home-cards-two { grid-template-columns: repeat(2, minmax(280px, 1fr)); }
.home-cards-quad { grid-template-columns: repeat(4, minmax(0,1fr)); }
.home-cards-five { grid-template-columns: repeat(5, minmax(0,1fr)); }
.home-cards-six { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card-link {
  min-height: 260px; border-radius: 28px; border:1px solid var(--line); background: rgba(255,255,255,.78);
  color: var(--text); padding:24px; text-decoration:none; display:grid; align-content:end; gap:10px;
}
.graphic-mark { width:76px; height:76px; border-radius:20px; display:block; margin-bottom:16px; }
.tone-a .graphic-mark { background: linear-gradient(135deg, #ffd166, #f95738); }
.tone-b .graphic-mark { background: linear-gradient(135deg, #5dade2, #183d5d); }
.tone-c .graphic-mark { background: linear-gradient(135deg, #7bd389, #24a47a); }
.tone-d .graphic-mark { background: linear-gradient(135deg, #f0f3bd, #3a506b); }
.tone-e .graphic-mark { background: linear-gradient(135deg, #f6bd60, #84a59d); }
.tone-f .graphic-mark { background: linear-gradient(135deg, #d4a5ff, #5465ff); }
.section + .section { margin-top: 28px; padding-top: 20px; border-top:1px solid var(--line); }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse: collapse; }
th, td { padding:14px 12px; text-align:left; border-bottom:1px solid var(--line); }
th { font-size:.85rem; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); }
.editor-grid { display:grid; grid-template-columns:minmax(260px,360px) 1fr; gap:18px; }
.editor-card, .user-card, .wish-entry, .empty-card {
  border-radius:22px; border:1px solid var(--line); background: rgba(255,255,255,.72); padding:16px; color:var(--text);
}
.section-tight { margin-top: 18px; }
.action-row, .wish-controls { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.inline-select { width:auto; min-width:160px; }
.compact-inline-select { min-width: 108px; min-height: 38px; padding: 8px 10px; }
.compact-save-button { min-height: 38px; padding: 0 12px; }
.user-grid { display:grid; gap:12px; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); margin-top:16px; }
.wish-list { list-style:none; padding:0; margin:0; display:grid; gap:12px; }
.logout-link { color: var(--text-light); text-decoration:none; font-weight:700; }
.compact-table th,
.compact-table td { padding: 10px 8px; font-size: .94rem; vertical-align: top; }
.compact-table td .button { min-height: 38px; padding: 0 14px; }
.compact-admin-table th,
.compact-admin-table td { padding: 8px 6px; font-size: .86rem; }
.table-note { margin: 0; color: var(--muted); font-size: .92rem; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  background: rgba(17, 32, 49, 0.08);
  color: var(--text);
}
.badge-open { background: rgba(36, 164, 122, 0.18); color: #165a44; }
.badge-closed { background: rgba(249, 87, 56, 0.18); color: #8a2c17; }
.badge-played { background: rgba(24, 61, 93, 0.16); color: #183d5d; }
.badge-priority-high { background: rgba(249, 87, 56, 0.18); color: #8a2c17; }
.badge-priority-medium { background: rgba(255, 182, 39, 0.24); color: #805400; }
.badge-priority-low { background: rgba(114, 132, 153, 0.18); color: #415364; }
.dj-layout { display: grid; gap: 18px; }
.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.summary-card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  padding: 14px 16px;
}
.summary-card strong { display: block; font-size: 1.4rem; margin-top: 6px; }
.dense-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dense-form-nowrap { flex-wrap: nowrap; }
.dense-form .inline-select { min-width: 120px; }
.table-actions { white-space: nowrap; }
.event-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}
.event-edit-span { grid-column: 1 / -1; }
.checkbox-cell {
  width: 20px;
  min-height: auto;
  height: 20px;
  padding: 0;
}
.below-table-actions {
  justify-content: flex-start;
  margin-top: 16px;
}
.profile-logo {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}
.profile-logo-large {
  width: 140px;
  height: 140px;
  border-radius: 26px;
}
.event-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  gap: 18px;
  align-items: center;
}
.event-hero-image {
  width: 100%;
  max-width: 300px;
  max-height: 300px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.16);
}
.event-logo {
  width: 110px;
  max-width: 100%;
  margin-top: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.96);
}
.light-copy { color: rgba(246, 247, 235, 0.86); }
.event-media-card { margin-bottom: 18px; }
.print-page { max-width: 980px; }
.print-card { padding: 32px; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.print-minimal {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 12px;
  padding: 28px 12px;
  color: var(--text);
}
.print-minimal-title { margin-top: 12px; }
.print-minimal-subtitle { margin-bottom: 8px; }
.print-minimal-event,
.print-minimal-date { max-width: 26ch; }
.print-event-image-wrap {
  width: 100%;
  max-width: 560px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}
.print-event-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.print-minimal-qr {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
  margin-top: 12px;
}
.print-actions {
  justify-content: center;
  margin-top: 18px;
}
.print-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.print-logo {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
}
.qr-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 18px;
  margin-top: 24px;
}
.qr-card {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  padding: 20px;
}
.qr-image {
  width: 100%;
  height: auto;
  display: block;
}
@media print {
  body { background: #fff; color: #111; }
  .page-shell { padding: 0; }
  .no-print { display: none !important; }
  .panel { background: #fff; border: 0; box-shadow: none; }
  .event-hero-image {
    width: 300px;
    max-width: 300px;
  }
  .print-minimal {
    min-height: auto;
    padding: 0;
  }
  .print-minimal-qr {
    max-width: 320px;
  }
}
@media (max-width: 860px) {
  .home-cards, .home-cards-two, .home-cards-three, .editor-grid { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .event-hero-grid, .qr-layout { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .wide-panel { max-width: 1180px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .event-edit-grid { grid-template-columns: 1fr; }
  .dense-form-nowrap { flex-wrap: wrap; }
  .dj-edit-row { grid-template-columns: 1fr; }
  .table-wrap { display: none; }
  .mobile-card-list { display: grid; gap: 12px; }
  .panel, .hero { padding: 20px; }
  .page-shell { padding: 16px 12px 32px; }
  .button, button { min-height: 44px; }
}
