/* The Liffey Backoffice — Ghost-inspired, calm and obvious */
:root {
  --bg: #ffffff;
  --side: #fbfbfb;
  --line: #e9ecef;
  --line-2: #dde1e5;
  --text: #15171a;
  --text-2: #394047;
  --muted: #7c8b9a;
  --green: #106a31;
  --green-2: #0b4721;
  --green-soft: #e7f3ec;
  --brass: #c9a35c;
  --red: #e03131;
  --red-soft: #fdecec;
  --amber-soft: #fff6e0;
  --amber: #8a5a00;
  --focus: 0 0 0 3px rgba(16, 106, 49, 0.25);
  --r: 10px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px -8px rgba(0, 0, 0, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); font-weight: 400; }
.spacer { flex: 1; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff;
  font-weight: 600; font-size: 14px; white-space: nowrap; transition: background-color .15s, border-color .15s, transform .1s;
  text-decoration: none; touch-action: manipulation;
}
.btn:hover { background: #f4f5f6; }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--text); color: #fff; border-color: var(--text); }
.btn--primary:hover { background: #2d2f33; }
.btn--green { background: var(--green); border-color: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-2); }
.btn--danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn--danger:hover { background: #c22a2a; }
.btn--danger-ghost { border-color: transparent; color: var(--red); background: transparent; }
.btn--danger-ghost:hover { background: var(--red-soft); }
.btn--lg { min-height: 48px; font-size: 15px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.is-loading { pointer-events: none; opacity: .7; }
.btn.is-loading::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); }
.icon-btn:hover { background: #f1f3f4; color: var(--text); }
.link-btn { border: 0; background: none; padding: 4px 6px; font-weight: 600; text-decoration: underline; color: inherit; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="url"], .field input[type="time"], .field textarea, .input-prefix {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus, .field textarea:focus, .input-prefix:focus-within { outline: none; border-color: var(--green); box-shadow: var(--focus); }
.field input.is-invalid { border-color: var(--red); }
.field__error, .form-error { color: var(--red); font-size: 13px; font-weight: 500; min-height: 0; }
.field__error:empty, .form-error:empty { display: none; }
.input-prefix { display: flex; align-items: center; gap: 2px; padding: 0 12px; }
.input-prefix span { color: var(--muted); }
.input-prefix input { border: 0; outline: 0; flex: 1; min-height: 42px; padding: 0; background: transparent; }
.field--inline { flex-direction: row; align-items: center; gap: 12px; margin-top: 12px; }
.field--inline input { max-width: 160px; }
.req { color: var(--red); }
.hint { color: var(--muted); font-size: 13px; margin-top: 10px; }

.switch { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; padding: 6px 0; font-size: 14px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track { width: 42px; height: 24px; border-radius: 99px; background: #d5dadf; position: relative; flex: none; margin-top: 2px; transition: background-color .2s; }
.switch__thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch input:checked + .switch__track { background: var(--green); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--focus); }

.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; min-height: 42px; padding: 8px 12px 8px 38px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 15px; background: #fff; }
.search input:focus { outline: none; border-color: var(--green); box-shadow: var(--focus); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at top, #12291f 0%, #0b100d 70%); }
.login__card { width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 36px 32px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
.login__logo { width: 210px; height: auto; margin: 0 auto 26px; display: block; filter: drop-shadow(0 1px 0 rgba(0,0,0,.25)); }
.login h1 { font-size: 22px; font-weight: 800; text-align: center; letter-spacing: -.01em; }
.login .muted { text-align: center; margin: 6px 0 22px; }
.demo-note { display: flex; gap: 10px; padding: 12px 14px; background: var(--amber-soft); color: var(--amber); border-radius: 10px; font-size: 13px; margin-bottom: 18px; }
.demo-note .ic { margin-top: 2px; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px; gap: 8px; }
.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-weight: 800; font-size: 15px; text-decoration: none; }
.sidebar__mark { width: 30px; height: 30px; border-radius: 8px; background: #12291f; color: var(--brass); display: grid; place-items: center; font-family: Georgia, serif; font-style: italic; font-size: 17px; }
.sidebar__nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar__nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--text-2); font-weight: 500; font-size: 14.5px; }
.sidebar__nav a:hover { background: #f0f2f3; color: var(--text); }
.sidebar__nav a.is-active { background: #eceef0; color: var(--text); font-weight: 700; }
.sidebar__ext { margin-top: 10px; border-top: 1px solid var(--line); border-radius: 0 !important; padding-top: 16px !important; }
.sidebar__new { margin: 14px 4px 0; }
.sidebar__foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 12px 6px 0; border-top: 1px solid var(--line); }
.sidebar__user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.sidebar__email { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; text-transform: uppercase; flex: none; }

.main { min-width: 0; }
.demo-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 32px; background: var(--amber-soft); color: var(--amber); font-size: 13.5px; border-bottom: 1px solid #f3e2b5; }
.demo-banner code { background: rgba(0,0,0,.06); padding: 1px 6px; border-radius: 4px; }
.demo-banner .link-btn { margin-left: auto; color: var(--amber); }
.view { padding: 36px 40px 120px; max-width: 1180px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.page-head p { color: var(--muted); margin-top: 4px; }

.tabbar { display: none; }

/* ---------- dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.stat { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; background: #fff; }
.stat__label { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.stat__value { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.stat__sub { font-size: 13px; color: var(--muted); }
.stat--warn .stat__value { color: var(--amber); }

.cards-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.card { border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; overflow: hidden; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card__head h2 { font-size: 15px; font-weight: 700; }
.card__head a { font-size: 13px; font-weight: 600; color: var(--green); text-decoration: none; }
.card__body { padding: 8px 20px 16px; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .ic { width: 32px; height: 32px; margin-bottom: 8px; color: #b8c2cc; }
.empty strong { display: block; color: var(--text); margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

.gap-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.gap-row:last-child { border-bottom: 0; }
.gap-row__date { font-weight: 700; min-width: 96px; }
.gap-row__txt { flex: 1; color: var(--muted); font-size: 13.5px; }
.gap-row .btn { min-height: 34px; padding: 0 12px; font-size: 13px; }

/* ---------- event list ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar .search { flex: 1; min-width: 200px; max-width: 360px; }
.tabs { display: inline-flex; padding: 4px; background: #f1f3f4; border-radius: 10px; gap: 2px; }
.tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 7px; font-weight: 600; font-size: 13.5px; color: var(--text-2); min-height: 34px; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tabs .count { color: var(--muted); font-weight: 500; margin-left: 4px; }

.month { margin-bottom: 28px; }
.month__title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 4px 10px; }
.day { display: grid; grid-template-columns: 76px 1fr; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; margin-bottom: 10px; overflow: hidden; }
.day.is-today { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.day__date { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 6px; background: #fafbfb; border-right: 1px solid var(--line); }
.day__wd { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.day__num { font-size: 24px; font-weight: 800; line-height: 1.1; }
.day__today { font-size: 10.5px; font-weight: 700; color: #fff; background: var(--green); border-radius: 99px; padding: 1px 7px; margin-top: 4px; }
.day__events { min-width: 0; }
.ev { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background-color .12s; }
.ev:last-child { border-bottom: 0; }
.ev:hover { background: #fafbfb; }
.ev__thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: #eef0f2; flex: none; display: grid; place-items: center; color: var(--muted); }
.ev__main { flex: 1; min-width: 0; }
.ev__title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13px; margin-top: 2px; }
.ev__meta span { display: inline-flex; align-items: center; gap: 5px; }
.ev__meta .ic { width: 14px; height: 14px; }
.ev__actions { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.ev:hover .ev__actions, .ev:focus-within .ev__actions { opacity: 1; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #eef0f2; color: var(--text-2); white-space: nowrap; }
.badge--live { background: var(--green-soft); color: var(--green); }
.badge--quiz { background: #e8f0fe; color: #1a56c4; }
.badge--karaoke { background: #fbe9f5; color: #a3237a; }
.badge--special { background: #fff1db; color: #925c00; }
.badge--sports { background: #eae8fd; color: #4d3cc4; }
.badge--hidden { background: #f1f3f4; color: var(--muted); }

/* ---------- artists grid ---------- */
.artists { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.artist-card { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; cursor: pointer; text-align: left; padding: 0; transition: box-shadow .2s, transform .2s var(--ease); }
.artist-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.artist-card__img { aspect-ratio: 1; background: #eef0f2; display: grid; place-items: center; color: #b8c2cc; overflow: hidden; }
.artist-card__img img { width: 100%; height: 100%; object-fit: cover; }
.artist-card__img .ic { width: 40px; height: 40px; }
.artist-card__body { padding: 12px 14px 14px; }
.artist-card__name { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.artist-card__meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.artist-card--new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 240px; border-style: dashed; border-width: 2px; color: var(--text-2); font-weight: 700; background: #fcfcfc; }
.artist-card--new .ic { width: 28px; height: 28px; }
.artist-card.is-archived { opacity: .6; }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(21, 23, 26, .45); animation: fade .2s; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: #fff; display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0,0,0,.2); animation: slideIn .32s var(--ease); }
@keyframes fade { from { opacity: 0; } }
@keyframes slideIn { from { transform: translateX(100%); } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 20px; font-weight: 800; }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 24px 24px; overscroll-behavior: contain; }
.drawer__foot { border-top: 1px solid var(--line); padding: 14px 24px; display: flex; flex-direction: column; gap: 12px; background: #fff; }
.drawer__summary { font-size: 14px; color: var(--text-2); }
.drawer__summary strong { color: var(--text); }
.drawer__summary.is-error { color: var(--red); font-weight: 600; }
.drawer__actions { display: flex; gap: 8px; justify-content: flex-end; }
.drawer__actions [data-action="delete-event"] { margin-right: auto; }

.step { padding: 20px 0 6px; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step__title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step__n { width: 24px; height: 24px; border-radius: 50%; background: var(--text); color: #fff; font-size: 12px; display: grid; place-items: center; flex: none; }

.kinds { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.kind { border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; padding: 14px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; text-align: center; transition: border-color .15s, background-color .15s; min-height: 84px; }
.kind .ic { width: 24px; height: 24px; color: var(--text-2); }
.kind:hover { border-color: #b9c0c7; }
.kind[aria-checked="true"] { border-color: var(--green); background: var(--green-soft); color: var(--green-2); }
.kind[aria-checked="true"] .ic { color: var(--green); }

.artist-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 12px; max-height: 268px; overflow-y: auto; padding: 2px; }
.pick { border: 1.5px solid transparent; border-radius: 12px; background: #fff; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; text-align: center; line-height: 1.25; position: relative; }
.pick:hover { background: #f6f7f8; }
.pick__img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #eef0f2; display: grid; place-items: center; color: var(--muted); }
.pick__country { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.pick[aria-checked="true"] { border-color: var(--green); background: var(--green-soft); }
.pick[aria-checked="true"]::after { content: ""; position: absolute; top: 6px; right: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat; }
.pick--new { border: 1.5px dashed var(--line-2); color: var(--text-2); }
.pick--new .pick__img { background: #f6f7f8; }

.cal { border: 1px solid var(--line); border-radius: 12px; padding: 12px; max-width: 420px; user-select: none; }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal__head strong { font-size: 15px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__wd { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal__day { aspect-ratio: 1; border: 0; border-radius: 10px; background: #f6f7f8; font-weight: 600; font-size: 14px; position: relative; min-height: 40px; transition: background-color .12s, color .12s; }
.cal__day:hover { background: #e9ecef; }
.cal__day.is-today { box-shadow: inset 0 0 0 1.5px var(--text); }
.cal__day.is-busy::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--brass); }
.cal__day[aria-pressed="true"] { background: var(--green); color: #fff; }
.cal__day[aria-pressed="true"]::after { background: #fff; }
.cal__day:disabled { background: transparent; color: #c7cdd3; cursor: not-allowed; }
.cal__blank { aspect-ratio: 1; }
.cal__legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.cal__legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brass); margin-right: 5px; vertical-align: middle; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px 5px 11px; border-radius: 99px; background: var(--green-soft); color: var(--green-2); font-size: 13px; font-weight: 600; border: 0; }
.chip .ic { width: 14px; height: 14px; }
.chip:hover { background: #d6eadd; }

.times { display: flex; flex-wrap: wrap; gap: 8px; }
.time { border: 1.5px solid var(--line-2); border-radius: 10px; background: #fff; padding: 9px 14px; font-weight: 700; font-size: 14px; min-height: 44px; display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.time small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.time:hover { border-color: #b9c0c7; }
.time[aria-checked="true"] { border-color: var(--green); background: var(--green-soft); color: var(--green-2); }

.seg { display: inline-flex; border: 1.5px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 10px 18px; font-weight: 600; min-height: 44px; display: inline-flex; gap: 8px; align-items: center; }
.seg button + button { border-left: 1.5px solid var(--line-2); }
.seg button[aria-checked="true"] { background: var(--green-soft); color: var(--green-2); }

/* drop zones */
.drop { position: relative; border: 2px dashed var(--line-2); border-radius: 14px; background: #fafbfb; display: grid; place-items: center; cursor: pointer; overflow: hidden; transition: border-color .15s, background-color .15s; }
.drop:hover, .drop.is-over { border-color: var(--green); background: var(--green-soft); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop__empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; font-size: 14px; text-align: center; padding: 12px; }
.drop__empty .ic { width: 28px; height: 28px; color: var(--muted); }
.drop__empty small { font-weight: 500; color: var(--muted); }
.drop__change { position: absolute; left: 8px; right: 8px; bottom: 8px; background: rgba(21,23,26,.75); color: #fff; font-size: 12.5px; font-weight: 600; text-align: center; padding: 6px; border-radius: 8px; opacity: 0; transition: opacity .15s; }
.drop.has-img .drop__empty { display: none; }
.drop.has-img:hover .drop__change { opacity: 1; }
.drop:not(.has-img) .drop__change { display: none; }
.drop.is-busy::after { content: "Uploading…"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.85); font-weight: 700; }
.drop--square { aspect-ratio: 1; width: 100%; }
.drop--wide { aspect-ratio: 16 / 7; width: 100%; }

/* ---------- modal ---------- */
.modal { border: 0; padding: 0; border-radius: 18px; width: min(680px, calc(100% - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }
.modal::backdrop { background: rgba(21, 23, 26, .5); }
.modal[open] { animation: pop .25s var(--ease); display: flex; flex-direction: column; }
.modal > form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); min-height: 0; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal--sm { width: min(420px, calc(100% - 24px)); }
.modal__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal__head h2 { font-size: 19px; font-weight: 800; }
.modal__body { padding: 22px; overflow-y: auto; }
.modal__foot { display: flex; gap: 8px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); }
.confirm__title { font-size: 19px; font-weight: 800; margin-bottom: 8px; }

.artist-form { display: grid; grid-template-columns: 200px 1fr; gap: 0 22px; }
.artist-form__fields .field:last-child { margin-bottom: 0; }
.artist-form__bio { grid-column: 1 / -1; margin-top: 16px; }
.artist-gigs h4 { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.artist-gigs ul { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.artist-gigs li { font-size: 13px; background: #f4f5f6; padding: 4px 10px; border-radius: 99px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--text); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); animation: toastIn .3s var(--ease); pointer-events: auto; }
.toast .ic { color: #6ee7a0; }
.toast--error { background: var(--red); }
.toast--error .ic { color: #fff; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: all .2s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

.skeleton { height: 72px; border-radius: 14px; background: linear-gradient(90deg, #f1f3f4 25%, #f8f9fa 50%, #f1f3f4 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; margin-bottom: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .cards-2 { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .view { padding: 24px 16px 110px; }
  .demo-banner { padding: 10px 16px; }
  .page-head h1 { font-size: 26px; }
  .page-head .btn--primary { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 6px 0; min-height: 48px; justify-content: center; }
  .tabbar a.is-active { color: var(--text); }
  .tabbar .ic { width: 22px; height: 22px; }
  .tabbar__add { width: 52px; height: 52px; border-radius: 50%; background: var(--text); color: #fff; border: 0; justify-self: center; display: grid; place-items: center; margin-top: -18px; box-shadow: 0 8px 20px -6px rgba(0,0,0,.4); }
  .ev__actions { opacity: 1; }
  .ev__actions .icon-btn:not([data-ev-edit]) { display: none; }
  .kinds { grid-template-columns: repeat(3, 1fr); }
  .drawer__panel { width: 100%; }
  .drawer__head, .drawer__body, .drawer__foot { padding-left: 16px; padding-right: 16px; }
  .artist-form { grid-template-columns: 1fr; }
  .artist-form .drop--square { max-width: 200px; margin: 0 auto 16px; }
  .toasts { bottom: 90px; }
}
@media (max-width: 520px) {
  .dash-grid { grid-template-columns: 1fr; }
  .artists { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .artist-card--new { min-height: 180px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
.field .input-prefix input[type="text"] { border: 0; box-shadow: none; min-height: 42px; padding: 0; background: transparent; }
.login__logo { background: #12291f; padding: 14px 18px; border-radius: 12px; width: 250px; box-sizing: border-box; }
