/* DJ Management – stylesheet */
:root {
  --bg: #0f1115;
  --bg-2: #161920;
  --card: #1b1f27;
  --card-2: #222731;
  --line: #2c323e;
  --text: #eef0f4;
  --muted: #9aa3b2;
  --accent: #ff7a1a;
  --accent-ink: #1a0d02;
  --accent-soft: rgba(255, 122, 26, .14);
  --blue: #4c8dff;
  --blue-soft: rgba(76, 141, 255, .15);
  --green: #36c47a;
  --green-soft: rgba(54, 196, 122, .15);
  --red: #ff5a5f;
  --red-soft: rgba(255, 90, 95, .14);
  --yellow: #f2c14e;
  --radius: 14px;
  --radius-sm: 9px;
  --topbar: 56px;
  --tabbar: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--font);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: .85rem; }
.ico { width: 20px; height: 20px; flex: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar);
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  background: rgba(15, 17, 21, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: .85rem; letter-spacing: .02em;
}
.brand-mark.big { width: 56px; height: 56px; border-radius: 16px; font-size: 1.3rem; }
.tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; padding: 2px 7px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); }
.topnav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.topnav form { margin: 0; }
.topnav-link {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px;
  color: var(--muted); background: none; border: 0; font: inherit; cursor: pointer;
}
.topnav-link:hover { background: var(--card); color: var(--text); text-decoration: none; }
@media (max-width: 640px) { .topnav-link span { display: none; } }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: calc(100vh - var(--topbar)); }
.main { flex: 1; min-width: 0; padding: 20px 16px calc(var(--tabbar) + 28px); max-width: 1180px; margin: 0 auto; width: 100%; }
.sidebar {
  width: 240px; flex: none; padding: 16px 10px; border-right: 1px solid var(--line);
  position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
}
.sidebar a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500;
}
.sidebar a:hover { background: var(--card); color: var(--text); text-decoration: none; }
.sidebar a.active { background: var(--accent-soft); color: var(--accent); }
.only-mobile { display: none; }
@media (max-width: 900px) {
  .desktop-only { display: none !important; }
  .area-admin .sidebar {
    position: fixed; left: 0; top: var(--topbar); bottom: 0; z-index: 40; background: var(--bg-2);
    transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.5);
  }
  .area-admin .sidebar.open { transform: none; }
  .only-mobile { display: inline-grid; }
  .area-admin .main { padding-bottom: 32px; }
}
@media (min-width: 901px) {
  .tabbar { display: none !important; }
  .main { padding: 28px 32px 48px; }
}

/* ---------- Tab bar (mobiel) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(22, 25, 32, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: .7rem; font-weight: 500;
}
.tabbar a.active { color: var(--accent); }
.tabbar a:hover { text-decoration: none; }
.tabbar .ico { width: 22px; height: 22px; }

/* ---------- Cards, grids ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card + .card, .card + .section, .section + .section, .section + .card { margin-top: 16px; }
.card h2 { margin-bottom: 12px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 1.6rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.warn b { color: var(--yellow); }
.section { margin-top: 24px; }
.section > h2 { margin-bottom: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 11px; border: 1px solid var(--line); background: var(--card-2);
  color: var(--text); font: 600 .92rem/1.2 var(--font); cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: #3b4352; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.07); border-color: var(--accent); }
.btn-blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-green { background: var(--green); border-color: var(--green); color: #04150c; }
.btn-danger { background: transparent; border-color: rgba(255,90,95,.5); color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 10px; font-size: .82rem; border-radius: 9px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line); color: var(--text); font-size: 1.3rem; cursor: pointer;
}
.icon-btn:hover { text-decoration: none; border-color: #3b4352; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.inline { display: inline; margin: 0; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 14px; }
label > input, label > select, label > textarea { margin-top: 6px; }
input, select, textarea {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); font: 400 .95rem/1.3 var(--font);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
input[type=file] { padding: 8px; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.form-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.filters label { margin: 0; min-width: 160px; flex: 1 1 160px; max-width: 280px; }
.filters .btn { height: 44px; }

/* ---------- Flash ---------- */
.flash { padding: 12px 14px; border-radius: 11px; margin-bottom: 14px; border: 1px solid; font-weight: 500; }
.flash-ok { background: var(--green-soft); border-color: rgba(54,196,122,.35); color: #8fe3b5; }
.flash-error { background: var(--red-soft); border-color: rgba(255,90,95,.35); color: #ffb0b2; }
.flash-info { background: var(--blue-soft); border-color: rgba(76,141,255,.35); color: #b5ceff; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700; background: var(--card-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge-booked { background: var(--blue-soft); color: #9cc0ff; border-color: transparent; }
.badge-seen { background: var(--green-soft); color: #8fe3b5; border-color: transparent; }
.badge-wait { background: rgba(242,193,78,.15); color: var(--yellow); border-color: transparent; }
.badge-accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge-red { background: var(--red-soft); color: #ffb0b2; border-color: transparent; }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
}
.item-date { flex: none; width: 54px; text-align: center; border-radius: 11px; background: var(--card-2); padding: 6px 0; }
.item-date b { display: block; font-size: 1.35rem; line-height: 1.1; }
.item-date span { font-size: .72rem; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.item-date.today { background: var(--accent); color: var(--accent-ink); }
.item-date.today span { color: var(--accent-ink); }
.item-body { flex: 1; min-width: 0; }
.item-body h3 { margin: 0 0 2px; }
.item-body p { margin: 0; color: var(--muted); font-size: .88rem; }
.item-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.item.highlight { border-color: rgba(255,122,26,.55); box-shadow: 0 0 0 1px rgba(255,122,26,.2) inset; }
@media (max-width: 560px) {
  .item { flex-wrap: wrap; }
  .item-side { flex-direction: row; width: 100%; justify-content: flex-end; }
}

.empty { text-align: center; padding: 36px 16px; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty h2 { color: var(--text); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; background: var(--bg-2); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(255,255,255,.015); }
td.nowrap, th.nowrap { white-space: nowrap; }
td.actions-cell { white-space: nowrap; text-align: right; }
td.actions-cell form { display: inline; }
tr.group-row td { background: var(--bg-2); font-weight: 700; color: var(--accent); }

/* ---------- Month nav & calendar ---------- */
.month-nav { display: flex; align-items: center; gap: 12px; }
.month-nav strong { min-width: 150px; text-align: center; font-size: 1.05rem; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head { text-align: center; font-size: .72rem; color: var(--muted); text-transform: uppercase; font-weight: 700; padding: 4px 0; }
.cal-day {
  position: relative; aspect-ratio: 1 / 1; min-height: 44px; min-width: 0; overflow: hidden; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: 600 1rem var(--font); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0;
}
.cal-day small { font-size: .62rem; font-weight: 600; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 3px; }
.cal-day:hover { border-color: #3d4554; }
.cal-day.empty-cell { visibility: hidden; }
.cal-day.past { opacity: .4; cursor: default; }
.cal-day.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cal-day.on small { color: var(--accent-ink); }
.cal-day.booked { background: var(--blue-soft); border-color: var(--blue); cursor: default; }
.cal-day.booked small { color: #9cc0ff; }
.cal-day.is-today { box-shadow: 0 0 0 2px var(--text) inset; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: .82rem; color: var(--muted); }
.cal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; background: var(--card); border: 1px solid var(--line); }
.cal-legend i.on { background: var(--accent); border-color: var(--accent); }
.cal-legend i.booked { background: var(--blue-soft); border-color: var(--blue); }
@media (min-width: 700px) { .cal-day { aspect-ratio: 1.35 / 1; } }

/* ---------- Plan board (admin) ---------- */
.day-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.day-block + .day-block { margin-top: 10px; }
.day-block header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.day-block header h3 { margin: 0; }
.day-block.weekend header h3 { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 99px;
  background: var(--card-2); border: 1px solid var(--line); font-size: .86rem;
}
.chip.booked { background: var(--blue-soft); border-color: rgba(76,141,255,.45); }
.chip.elsewhere { opacity: .55; }
.chip form { display: inline; margin: 0; }
.chip .btn-sm { padding: 4px 10px; border-radius: 99px; }
.chip-note { color: var(--muted); font-size: .78rem; }

/* ---------- Location cards ---------- */
.loc-card { display: block; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.loc-card:hover { text-decoration: none; border-color: #3d4554; }
.loc-card img, .loc-card .ph { width: 100%; height: 140px; object-fit: cover; display: block; background: linear-gradient(135deg, #232838, #1a1d26); }
.loc-card .ph { display: grid; place-items: center; color: var(--muted); font-size: 2rem; font-weight: 800; }
.loc-card div.body { padding: 12px 14px; }
.loc-card h3 { margin: 0 0 2px; }
.loc-card p { margin: 0; color: var(--muted); font-size: .85rem; }
.info-list { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; }
.info-list dt { color: var(--muted); font-weight: 600; font-size: .85rem; }
.info-list dd { margin: 0; white-space: pre-line; }
.hero-img { width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px; }
@media (max-width: 560px) { .info-list { grid-template-columns: 1fr; gap: 2px; } .info-list dd { margin-bottom: 10px; } }

/* ---------- Auth ---------- */
body.bare { display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(ellipse at 20% 0%, rgba(255,122,26,.16), transparent 55%),
  radial-gradient(ellipse at 100% 100%, rgba(76,141,255,.12), transparent 50%), var(--bg); }
body.bare .shell, body.bare .main { min-height: 0; padding: 0; display: block; }
.auth { width: 100%; max-width: 400px; margin: 0 auto; }
.auth-brand { text-align: center; margin-bottom: 20px; }
.auth-brand h1 { margin: 14px 0 4px; }
.auth-brand p { color: var(--muted); margin: 0; }
.auth-card { padding: 24px; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; font-size: .9rem; flex-wrap: wrap; }

/* ---------- Modal ---------- */
dialog.modal {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 1px solid var(--line); border-radius: 18px;
  background: var(--card); color: var(--text); padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
dialog.modal::backdrop { background: rgba(5, 6, 9, .7); backdrop-filter: blur(3px); }
dialog.modal h2 { margin-bottom: 12px; }
.prose { color: #d6dae2; }

/* ---------- Profile & misc ---------- */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--card-2); display: inline-grid; place-items: center; font-weight: 700; color: var(--muted); flex: none; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell .avatar { width: 32px; height: 32px; font-size: .8rem; }
.roles { display: flex; gap: 4px; flex-wrap: wrap; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.greeting { margin-bottom: 18px; }
.greeting h1 { margin-bottom: 4px; }
.greeting p { color: var(--muted); margin: 0; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 18px 0; }
.quick a { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); color: var(--text); font-weight: 600; }
.quick a:hover { text-decoration: none; border-color: #3d4554; }
.quick a .ico { color: var(--accent); width: 24px; height: 24px; }
.split { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .split { grid-template-columns: 1.4fr 1fr; } .split.even { grid-template-columns: 1fr 1fr; } }
.checklist { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: var(--bg-2); }
.checklist label { margin: 0; padding: 7px 0; border-bottom: 1px solid var(--line); }
.checklist label:last-child { border-bottom: 0; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; margin-top: 12px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.item-link { color: inherit; }
.item-link:hover { text-decoration: none; border-color: #3d4554; }
.page-head h2 { margin: 0; }
.note-form { display: flex; gap: 8px; }
.note-form input { padding: 8px 10px; }
.list-month { margin: 14px 0 2px; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.list-month:first-child { margin-top: 0; }
label.search { margin: 0; min-width: 240px; }
.profile-photo { margin-bottom: 14px; }
.profile-photo label { flex: 1; margin: 0; }
.profile-photo .avatar { width: 56px; height: 56px; font-size: 1.2rem; }
@media (max-width: 560px) { .cal { gap: 4px; } .cal-day { border-radius: 9px; font-size: .92rem; } .cal-day small { font-size: .55rem; } .card:has(> form > .cal) { padding: 12px; } }
a.stat { color: var(--text); }
a.stat:hover { text-decoration: none; border-color: #3d4554; }
tr.past-row td { opacity: .55; }
@media (min-width: 901px) { .icon-btn.only-mobile { display: none; } }
