/* P3Y admin panel: saffron + warm neutrals. */
:root {
  --primary: #E8630A;
  --primary-600: #C9530A;
  --primary-700: #A84408;
  --primary-50: #FFF5EC;
  --primary-100: #FFE7D1;
  --primary-200: #FBCFA6;
  --bg: #FAF6F1;
  --surface: #FFFFFF;
  --surface-2: #FCFAF7;
  --border: #ECE3D8;
  --border-strong: #DCCFBF;
  --text: #2B2118;
  --text-2: #5A4B3E;
  --muted: #8A7A6B;
  --sidebar: #2A1C12;
  --sidebar-2: #3A281B;
  --sidebar-text: #F3E6D8;
  --sidebar-muted: #B9A390;
  --green: #2E7D4F;
  --green-bg: #E6F4EC;
  --red: #C0392B;
  --red-bg: #FCEAE8;
  --blue: #2F65A8;
  --blue-bg: #E7EFFA;
  --amber-bg: #FFF1DC;
  --grey-bg: #F0EBE5;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(60, 35, 10, .05), 0 2px 10px rgba(60, 35, 10, .05);
  --shadow-lg: 0 10px 40px rgba(40, 20, 5, .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Noto Sans Gujarati", "Nirmala UI", "Mangal", "Shruti", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --sidebar-w: 248px;
}

[x-cloak] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 1.55rem; font-weight: 750; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
p { margin: 0; }
a { color: var(--primary-600); }
code { font-family: var(--mono); font-size: .88em; background: var(--primary-50); color: var(--primary-700); padding: 1px 5px; border-radius: 5px; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.mono { font-family: var(--mono); font-size: .86em; }
.nowrap { white-space: nowrap; }
.block { display: block; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt { margin-top: 22px; }

.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- spinner + boot */
.spinner { display: inline-block; width: 22px; height: 22px; border: 2.5px solid var(--primary-100); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; flex: none; }
.spinner.sm { width: 15px; height: 15px; border-width: 2px; border-color: rgba(255, 255, 255, .45); border-top-color: currentColor; }
.btn.ghost .spinner.sm { border-color: var(--primary-100); border-top-color: var(--primary); }
.spinner.lg { width: 38px; height: 38px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot { min-height: 100vh; display: grid; place-items: center; }
.loading { display: flex; align-items: center; gap: 12px; padding: 28px; color: var(--muted); justify-content: center; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 8px 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: .93rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
  background: var(--surface); color: var(--text);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(168, 68, 8, .3); }
.btn.primary:hover:not(:disabled) { background: var(--primary-600); }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger:hover:not(:disabled) { background: #a32f23; }
.btn.ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text-2); }
.btn.ghost:hover:not(:disabled) { border-color: var(--primary-200); background: var(--primary-50); color: var(--primary-700); }
.btn.ghost.danger-text { color: var(--red); }
.btn.ghost.danger-text:hover:not(:disabled) { background: var(--red-bg); border-color: #f2c2bc; color: var(--red); }
.btn.ghost-light { background: transparent; border-color: rgba(255, 255, 255, .16); color: var(--sidebar-text); }
.btn.ghost-light:hover { background: rgba(255, 255, 255, .07); }
.btn.block { width: 100%; }
.btn.small { min-height: 32px; padding: 5px 11px; font-size: .84rem; border-radius: 8px; }
.btn .i { width: 17px; height: 17px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn-row.end { justify-content: flex-end; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }

.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 0;
  background: transparent; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s; flex: none;
}
.icon-btn:hover { background: var(--primary-50); color: var(--primary-700); }
.icon-btn.danger:hover { background: var(--red-bg); color: var(--red); }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > span { font-size: .84rem; font-weight: 650; color: var(--text-2); }
.field em { font-style: normal; font-weight: 500; color: var(--muted); }
.field small, .hint { font-size: .8rem; color: var(--muted); line-height: 1.45; }
.hint { display: block; margin: 0 0 14px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color .15s, box-shadow .15s; outline: none;
}
textarea { resize: vertical; line-height: 1.55; }
textarea.body-text { min-height: 360px; font-size: .97rem; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232, 99, 10, .15); }
select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A7A6B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.form-error { color: var(--red); font-size: .87rem; background: var(--red-bg); border-radius: 8px; padding: 8px 12px; margin-bottom: 14px; }
small.form-error { display: block; margin: 8px 0 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid-2.align-end { align-items: end; }

/* switch */
.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; margin-bottom: 14px; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slider { flex: none; width: 42px; height: 24px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .2s; margin-top: 1px; }
.slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::after { transform: translateX(18px); }
.switch input:focus-visible + .slider { box-shadow: 0 0 0 3px rgba(232, 99, 10, .25); }
.switch-text { display: flex; flex-direction: column; }
.switch-text b { font-size: .92rem; }
.switch-text small { color: var(--muted); font-size: .8rem; }
.switch.tiny { margin: 0; }
.switch.tiny .slider { width: 36px; height: 21px; }
.switch.tiny .slider::after { width: 15px; height: 15px; }
.switch.tiny input:checked + .slider::after { transform: translateX(15px); }

/* ---------------------------------------------------------------- login */
.login-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px;
  background: radial-gradient(1200px 600px at 10% -10%, #FFE2C4 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #FDD9B5 0%, transparent 55%), var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 20px; padding: 34px 30px 28px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.login-logo { width: 62px; height: 62px; display: block; margin-bottom: 16px; }
.login-card h1 { margin-bottom: 4px; }
.login-card > p { margin-bottom: 24px; }
.login-foot { margin-top: 22px; color: var(--muted); font-size: .84rem; }

/* ---------------------------------------------------------------- shell */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--sidebar); color: var(--sidebar-text);
  display: flex; flex-direction: column; z-index: 40; overflow-y: auto;
  background-image: linear-gradient(180deg, rgba(232, 99, 10, .10), transparent 240px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 18px; }
.brand img { width: 40px; height: 40px; }
.brand strong { display: block; font-size: 1.02rem; }
.brand small { display: block; color: var(--sidebar-muted); font-size: .76rem; }
.brand > div { flex: 1; }
.sidebar-close { display: none; color: var(--sidebar-text); }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; flex: 1; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--sidebar-text);
  text-decoration: none; font-weight: 550; font-size: .93rem; opacity: .86; transition: background .15s, opacity .15s;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, .06); opacity: 1; }
.sidebar nav a.active { background: var(--primary); color: #fff; opacity: 1; box-shadow: 0 4px 14px rgba(232, 99, 10, .35); }
.sidebar nav a span { flex: 1; }
.nav-badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--primary-100); color: var(--primary-700); font-size: .74rem; display: grid; place-items: center; }
.sidebar nav a.active .nav-badge { background: #fff; }
.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.me { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; min-width: 0; }
.me > div { min-width: 0; }
.me strong { display: block; font-size: .9rem; }
.me small { display: block; color: var(--sidebar-muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.avatar.soft { background: var(--primary-100); color: var(--primary-700); }

.main { margin-left: var(--sidebar-w); min-height: 100vh; }
.topbar { display: none; }
.content-area { max-width: 1240px; margin: 0 auto; padding: 30px 32px 60px; }
.scrim { position: fixed; inset: 0; background: rgba(30, 15, 5, .45); z-index: 35; }

/* ---------------------------------------------------------------- page building blocks */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.link-back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; margin-bottom: 8px; color: var(--primary-600); font-weight: 600; font-size: .88rem; cursor: pointer; }
.link-back .i { width: 16px; height: 16px; }
.section-title { font-size: 1.02rem; margin: 32px 0 14px; color: var(--text-2); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card.pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty.small { padding: 14px 0; font-size: .88rem; align-items: flex-start; }
.card.empty { padding: 48px 20px; }

.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px; font-size: .74rem; font-weight: 650; white-space: nowrap; background: var(--grey-bg); color: var(--text-2); }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.saffron { background: var(--primary-100); color: var(--primary-700); }
.badge.grey { background: var(--grey-bg); color: var(--muted); }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 6px; font-size: .75rem; font-weight: 650; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 5px; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); border-radius: 99px; padding: 7px 15px; font-weight: 600; font-size: .87rem; cursor: pointer; transition: all .15s; }
.tabs button:hover { border-color: var(--primary-200); color: var(--primary-700); }
.tabs button.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.search { position: relative; display: flex; align-items: center; flex: 0 1 340px; min-width: 200px; }
.search.wide { flex-basis: 520px; }
.search .i { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 38px; }

/* lists */
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--border); }
.list-row:first-child { border-top: 0; }
.list-row:hover { background: var(--surface-2); }
.list-row.past { opacity: .72; }
.thumb { flex: none; width: 58px; height: 58px; border-radius: 10px; overflow: hidden; background: var(--primary-50); color: var(--primary-200); display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .i { width: 24px; height: 24px; color: var(--primary); opacity: .5; }
.row-title { font-weight: 650; color: var(--text); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; }
.row-title:hover { color: var(--primary-600); }
.row-actions { display: flex; gap: 2px; flex: none; }
.date-tile { flex: none; width: 56px; height: 58px; border-radius: 12px; background: var(--primary-50); border: 1px solid var(--primary-100); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--primary-700); }
.date-tile b { font-size: 1.3rem; line-height: 1; }
.date-tile span { font-size: .72rem; text-transform: uppercase; font-weight: 700; letter-spacing: .04em; margin-top: 3px; }
.capacity { flex: none; width: 130px; font-size: .84rem; color: var(--text-2); }
.bar { height: 6px; border-radius: 99px; background: var(--grey-bg); margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #F59331, var(--primary)); border-radius: 99px; }

/* tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr.blocked td { background: #FFF8F7; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px; border-top: 1px solid var(--border); }

/* ---------------------------------------------------------------- dashboard */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.stat-card { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.stat-card:hover { transform: translateY(-2px); border-color: var(--primary-200); box-shadow: 0 8px 24px rgba(60, 35, 10, .08); }
.stat-label { font-size: .84rem; font-weight: 650; color: var(--text-2); }
.stat-value { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--text); }
.stat-sub { font-size: .79rem; color: var(--muted); }
.stat-card.accent { background: linear-gradient(135deg, #F4862A, var(--primary-600)); border-color: transparent; }
.stat-card.accent .stat-label, .stat-card.accent .stat-value, .stat-card.accent .stat-sub { color: #fff; }
.stat-card.accent .stat-sub { opacity: .85; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.quick { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.quick:hover { border-color: var(--primary-200); background: var(--primary-50); }
.quick b { display: block; font-size: .94rem; }
.quick small { display: block; color: var(--muted); font-size: .8rem; }
.quick-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-100); color: var(--primary-700); display: grid; place-items: center; }

/* ---------------------------------------------------------------- editors */
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.side .card.pad { padding: 20px; }
.lang-tabs { display: flex; gap: 4px; padding: 4px; background: var(--grey-bg); border-radius: 12px; margin-bottom: 14px; overflow-x: auto; }
.lang-tabs button { flex: 1; min-width: max-content; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-weight: 650; color: var(--text-2); cursor: pointer; font-size: .93rem; }
.lang-tabs button.active { background: var(--surface); color: var(--primary-700); box-shadow: 0 1px 3px rgba(60, 35, 10, .12); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; }
.image-box { border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px dashed var(--border-strong); aspect-ratio: 16 / 10; display: grid; place-items: center; }
.image-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-box.wide { aspect-ratio: 16 / 7; }
.image-ph { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: .84rem; text-align: center; padding: 12px; }
.image-ph .i { width: 30px; height: 30px; opacity: .6; }
.yt-thumb { display: block; width: 100%; border-radius: 10px; aspect-ratio: 16 / 9; object-fit: cover; }
.yt-preview { border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px dashed var(--border-strong); aspect-ratio: 16 / 9; display: grid; place-items: center; margin-bottom: 16px; }
.yt-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sticky-save { display: none; }

/* ---------------------------------------------------------------- class detail */
.mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.mini-stats > div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); }
.mini-stats b { display: block; font-size: 1.4rem; font-weight: 800; }
.mini-stats span { font-size: .8rem; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; align-items: start; }
.attendance-box { border-top: 4px solid var(--primary); }
.att-form { display: flex; gap: 8px; }
.att-form input { font-family: var(--mono); font-size: 1rem; letter-spacing: .02em; }
.att-result { margin-top: 14px; padding: 12px 14px; border-radius: 10px; border-left: 4px solid; }
.att-result b { display: block; }
.att-result span, .att-result small { display: block; font-size: .85rem; }
.att-result.ok { background: var(--green-bg); border-color: var(--green); }
.att-result.info { background: var(--amber-bg); border-color: #D98E04; }
.att-result.bad { background: var(--red-bg); border-color: var(--red); }
.att-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.att-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.att-list li:first-child { border-top: 0; }
.att-list b { display: block; font-size: .92rem; }
.att-list small { color: var(--muted); font-size: .8rem; }

/* ---------------------------------------------------------------- registrations */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.field.inline { margin: 0; flex: 0 1 200px; }
.field.inline.grow { flex: 1 1 260px; }
.reg-head, .reg-row.full { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1.3fr); gap: 16px; }
.reg-head { padding: 12px 18px; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; background: var(--surface-2); border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.reg-row { padding: 14px 18px; border-top: 1px solid var(--border); }
.reg-head + template + .reg-row, .reg-head + .reg-row { border-top: 0; }
.reg-member b { display: block; }
.reg-member small, .reg-what small { display: block; font-size: .8rem; color: var(--text-2); }
.reg-member .badge { margin-top: 4px; }
.reg-what .chip { margin-bottom: 4px; }
.kv { margin: 0; display: flex; flex-direction: column; gap: 3px; font-size: .85rem; }
.kv > div { display: flex; gap: 6px; }
.kv dt { color: var(--muted); flex: none; }
.kv dt::after { content: ":"; }
.kv dd { margin: 0; word-break: break-word; white-space: pre-line; }
.reg-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.reg-actions textarea { min-height: 38px; font-size: .86rem; padding: 7px 10px; }
.reg-actions .btn { align-self: flex-end; }
.status-select { min-height: 36px; padding: 6px 32px 6px 12px; font-weight: 650; font-size: .86rem; border-radius: 8px; }
.status-select.pending { background-color: var(--amber-bg); border-color: #F0CB8A; color: #8A5A00; }
.status-select.confirmed { background-color: var(--green-bg); border-color: #A9D8BC; color: var(--green); }
.status-select.cancelled { background-color: var(--grey-bg); border-color: var(--border-strong); color: var(--muted); }
.reg-list.compact .reg-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 140px; gap: 12px; align-items: start; padding: 12px 0; }
.reg-list.compact .reg-row:first-child { border-top: 0; }

/* ---------------------------------------------------------------- videos */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.video-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.video-card.hidden .video-thumb img { filter: grayscale(.8); opacity: .6; }
.video-thumb { position: relative; display: block; border: 0; padding: 0; aspect-ratio: 16 / 9; background: #1a120c; cursor: pointer; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play { position: absolute; left: 50%; top: 50%; width: 48px; height: 34px; margin: -17px 0 0 -24px; border-radius: 10px; background: rgba(0, 0, 0, .65); transition: background .15s; }
.play::after { content: ""; position: absolute; left: 20px; top: 10px; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent #fff; }
.video-thumb:hover .play { background: #E62117; }
.video-body { padding: 12px 14px 4px; flex: 1; }
.video-body b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .93rem; }
.video-actions { display: flex; align-items: center; gap: 2px; padding: 6px 8px 10px 14px; }
.video-actions .switch { margin-right: auto; }

/* ---------------------------------------------------------------- experiences */
.exp-list { display: grid; gap: 14px; }
.exp-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.exp-card header b { display: block; }
.exp-card header small { display: block; font-size: .8rem; }
.exp-text { white-space: pre-line; color: var(--text); background: var(--surface-2); border-radius: 10px; padding: 14px 16px; border-left: 3px solid var(--primary-200); font-size: .96rem; line-height: 1.65; }
.exp-card footer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.quote { margin: 0 0 16px; padding: 12px 14px; max-height: 180px; overflow-y: auto; background: var(--surface-2); border-left: 3px solid var(--primary-200); border-radius: 8px; white-space: pre-line; font-size: .9rem; color: var(--text-2); }

/* ---------------------------------------------------------------- notifications */
.note-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--primary-50); border: 1px solid var(--primary-100); color: var(--text-2); margin-bottom: 18px; font-size: .9rem; }
.note-box .i { color: var(--primary); margin-top: 1px; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); }
.notif-list li:first-child { border-top: 0; padding-top: 0; }
.notif-list b { display: block; }
.notif-list p { font-size: .88rem; color: var(--text-2); margin-top: 2px; white-space: pre-line; }
.link-text { word-break: break-all; }

/* ---------------------------------------------------------------- settings */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.span-2 { grid-column: 1 / -1; }
.centers { display: flex; flex-direction: column; gap: 10px; }
.center-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1.4fr) 36px; gap: 12px; align-items: end; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.center-row .field { margin: 0; }
.center-row .icon-btn { margin-bottom: 3px; }
.center-ic { width: 38px; height: 42px; border-radius: 10px; background: var(--primary-100); color: var(--primary-700); display: grid; place-items: center; }

/* ---------------------------------------------------------------- modal */
.modal-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-wrap.confirm { z-index: 80; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(30, 15, 5, .5); }
.modal { position: relative; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); width: 100%; max-width: 620px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: pop .16s ease-out; }
.modal.small { max-width: 430px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal.small .modal-body h2 { margin-bottom: 8px; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 18px 18px; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 12px; background: #2A1C12; color: #fff; box-shadow: var(--shadow-lg); font-size: .9rem; cursor: pointer; animation: pop .18s ease-out; }
.toast .i { margin-top: 1px; }
.toast.success .i { color: #7BD9A1; }
.toast.error { background: var(--red); }
.toast.info .i { color: #F8C98F; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .editor-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .hide-md { display: none; }
  .reg-head { display: none; }
  .reg-row.full { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: none; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .sidebar-close { display: inline-grid; }
  .main { margin-left: 0; }
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; height: 56px; padding: 0 10px;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
  }
  .topbar strong { flex: 1; font-size: 1.02rem; }
  .topbar-logo { width: 30px; height: 30px; margin-right: 4px; }
  .content-area { padding: 18px 16px 90px; }
  .editor-grid, .detail-grid, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head .actions.editor-actions { display: none; }
  .sticky-save {
    display: flex; gap: 8px; justify-content: flex-end; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .95); border-top: 1px solid var(--border); backdrop-filter: blur(8px);
  }
  .sticky-save .btn { flex: 1; }
  .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .center-row { grid-template-columns: minmax(0, 1fr) 36px; }
  .center-ic { display: none; }
  .center-row .field:nth-of-type(1) { grid-column: 1; }
  .center-row .field:nth-of-type(2), .center-row .field:nth-of-type(3) { grid-column: 1; }
  .center-row .icon-btn { grid-column: 2; grid-row: 1; }
}

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  h1 { font-size: 1.3rem; }
  .card.pad { padding: 16px; }
  .hide-sm { display: none; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .list-row { padding: 12px 14px; gap: 12px; flex-wrap: wrap; }
  .list-row .grow { flex-basis: calc(100% - 140px); }
  .capacity { order: 5; width: auto; flex: 1 1 100%; padding-left: 68px; }
  .row-actions { margin-left: auto; }
  .thumb { width: 48px; height: 48px; }
  .date-tile { width: 50px; height: 52px; }
  .reg-row.full { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .reg-list.compact .reg-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 1.7rem; }
  .att-form { flex-direction: column; }
  .modal-wrap { padding: 0; align-items: flex-end; }
  .modal { max-height: 92vh; border-radius: 18px 18px 0 0; }
  .modal-foot { border-radius: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .toasts { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .search, .search.wide { flex: 1 1 100%; }
  .field.inline, .field.inline.grow { flex: 1 1 100%; }
}
