:root {
    --ink: #172019;
    --ink-soft: #344139;
    --paper: #f7f6f1;
    --white: #fff;
    --lime: #caff66;
    --violet: #b7a8ff;
    --coral: #ff8066;
    --blue: #8bd8ee;
    --muted: #707a73;
    --line: #e2e5df;
    --danger: #b83d3d;
    --success: #277a4d;
    --shadow: 0 20px 60px rgba(25, 35, 27, .08);
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }

.auth-body { min-height: 100vh; background: var(--ink); }
.auth-wrap { display: grid; grid-template-columns: minmax(390px, .9fr) 1.1fr; min-height: 100vh; }
.auth-story { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 56px clamp(42px, 6vw, 90px); background: var(--ink); color: #fff; }
.auth-story::before { position: absolute; right: -120px; bottom: -140px; width: 390px; height: 390px; border: 68px solid var(--lime); border-radius: 50%; content: ""; opacity: .95; }
.auth-story::after { position: absolute; right: 120px; top: 100px; width: 82px; height: 82px; border: 23px solid var(--violet); border-radius: 50%; content: ""; transform: rotate(10deg); }
.auth-story-activation::before { border-color: var(--violet); }
.auth-story-activation::after { border-color: var(--coral); }
.auth-brand { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 10px; width: max-content; font-size: 24px; font-weight: 850; letter-spacing: -1px; }
.auth-brand span { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 13px; background: var(--lime); color: var(--ink); font-family: Georgia, serif; font-size: 27px; font-style: italic; }
.auth-story > div { position: relative; z-index: 2; max-width: 530px; }
.auth-kicker, .auth-step, .eyebrow { margin: 0 0 13px; color: #96a59b; font-size: 10px; font-weight: 800; letter-spacing: 1.7px; }
.auth-story h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(48px, 6vw, 82px); font-weight: 400; letter-spacing: -3.5px; line-height: .98; }
.auth-story > div > p:last-child { max-width: 460px; margin: 28px 0 0; color: #aab5ad; font-size: 16px; }
.auth-story > small { position: relative; z-index: 2; color: #7e8b82; }
.auth-panel { display: grid; place-items: center; padding: 48px; background: var(--paper); }
.auth-form-wrap { width: min(100%, 470px); }
.auth-step, .eyebrow { color: #69756d; }
.auth-form-wrap h2 { margin: 0; font-size: 43px; letter-spacing: -2px; line-height: 1.05; }
.auth-intro { margin: 14px 0 32px; color: var(--muted); }
.auth-form { display: grid; gap: 19px; }
.auth-form label, .field { display: flex; flex-direction: column; gap: 7px; }
.auth-form label > span, .field > span, .filter-form label > span, .inline-edit-form label > span { font-size: 11px; font-weight: 750; }
.auth-form input, .field input, .field textarea, .field select, .filter-form input, .filter-form select, .inline-edit-form input { width: 100%; min-height: 49px; padding: 12px 14px; border: 1px solid #d9ddd7; border-radius: 10px; outline: none; background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: auto; resize: vertical; }
.auth-form input:focus, .field input:focus, .field textarea:focus, .field select:focus, .filter-form input:focus, .filter-form select:focus, .inline-edit-form input:focus { border-color: #584fd2; box-shadow: 0 0 0 3px rgba(88, 79, 210, .12); }
.auth-form label small, .field small { color: var(--muted); font-size: 10px; }
.auth-help { margin: 24px 0 0; color: #89928c; font-size: 11px; text-align: center; }
.auth-help a { border-bottom: 1px solid currentColor; color: var(--ink); font-weight: 750; }
.organizer-register-panel { align-items: start; overflow-y: auto; }
.organizer-register-wrap { width: min(100%, 620px); padding: 20px 0; }
.auth-field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-form select { width: 100%; min-height: 49px; padding: 12px 14px; border: 1px solid #d9ddd7; border-radius: 10px; background: #fff; }
.auth-check { display: flex; flex-direction: row !important; align-items: flex-start; gap: 10px !important; cursor: pointer; color: var(--muted); font-size: 10px; }
.auth-check input { width: 17px !important; min-height: 17px !important; margin: 1px 0 0; accent-color: var(--ink); }

.admin-button { display: inline-flex; align-items: center; justify-content: center; gap: 22px; min-height: 44px; padding: 0 19px; border: 0; border-radius: 999px; cursor: pointer; font-weight: 750; transition: transform .2s, box-shadow .2s; }
.admin-button:hover { transform: translateY(-1px); }
.admin-button-primary { background: var(--ink); color: #fff; box-shadow: 0 8px 22px rgba(23, 32, 25, .15); }
.admin-button-secondary { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.auth-form .admin-button { width: 100%; min-height: 52px; margin-top: 6px; }
.notice { margin-bottom: 22px; padding: 13px 16px; border-radius: 10px; font-size: 12px; font-weight: 650; }
.notice-error { border: 1px solid #f0c5c5; background: #fff1f1; color: #933333; }
.notice-success { border: 1px solid #bde1ca; background: #effaf3; color: #246841; }
.notice-warning { border: 1px solid #ead69f; background: #fff8df; color: #765b16; }
.notice ul { margin: 7px 0 0; padding-left: 19px; }

.admin-body { min-height: 100vh; background: var(--paper); }
.admin-body.admin-menu-open { overflow: hidden; }
.admin-shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; flex-direction: column; width: 236px; padding: 29px 19px 21px; background: var(--ink); color: #fff; }
.admin-drawer-head { display: flex; align-items: center; justify-content: space-between; }
.admin-menu-toggle, .admin-menu-close, .admin-drawer-overlay { display: none; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 28px; font-size: 20px; font-weight: 850; letter-spacing: -.7px; }
.admin-brand span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; background: var(--lime); color: var(--ink); font-family: Georgia, serif; font-size: 23px; font-style: italic; }
.admin-sidebar nav { display: grid; gap: 3px; }
.admin-sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 9px; color: #aab5ad; font-size: 12px; font-weight: 650; }
.admin-sidebar nav a:hover, .admin-sidebar nav a.is-active { background: rgba(255,255,255,.09); color: #fff; }
.admin-sidebar nav a.is-active { box-shadow: inset 3px 0 0 var(--lime); }
.admin-sidebar nav i { width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 50%; }
.admin-sidebar nav a.is-active i { border-color: var(--lime); background: var(--lime); }
.organizer-sidebar { background: #232052; }
.organizer-sidebar .admin-brand span { background: var(--violet); }
.organizer-sidebar nav a.is-active { box-shadow: inset 3px 0 0 var(--violet); }
.organizer-sidebar nav a.is-active i { border-color: var(--violet); background: var(--violet); }
.organizer-name { display: flex; flex-direction: column; margin: 0 8px 24px; padding: 15px 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.05); }
.organizer-name small { color: #a9a0de; font-size: 7px; font-weight: 850; letter-spacing: 1px; }
.organizer-name strong { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.admin-sidebar-foot { display: grid; gap: 8px; margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); }
.admin-sidebar-foot a, .admin-sidebar-foot button { width: 100%; padding: 7px 10px; border: 0; background: transparent; color: #8c9990; cursor: pointer; font-size: 11px; text-align: left; }
.admin-sidebar-foot a:hover, .admin-sidebar-foot button:hover { color: #fff; }
.admin-sidebar-foot a span { float: right; }
.admin-main { grid-column: 2; min-width: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; min-height: 80px; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.86); backdrop-filter: blur(12px); }
.admin-topbar-title { display: flex; flex-direction: column; }
.admin-topbar-title small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: 1.4px; }
.admin-topbar-title strong { font-size: 17px; }
.admin-user-chip { display: flex; align-items: center; gap: 10px; }
.admin-user-chip > span, .person-cell > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--violet); font-size: 10px; font-weight: 850; }
.admin-user-chip div { display: flex; flex-direction: column; }
.admin-user-chip strong { font-size: 11px; }
.admin-user-chip small { color: var(--muted); font-size: 9px; }
.admin-content { width: min(100%, 1440px); margin: 0 auto; padding: 38px 34px 70px; }
.page-heading { margin-bottom: 29px; }
.page-heading-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; }
.page-heading h1 { margin: 0; font-size: clamp(35px, 4vw, 50px); letter-spacing: -2.3px; line-height: 1; }
.page-heading > div > p:last-child, .page-heading > p:last-child { margin: 13px 0 0; color: var(--muted); }
.eyebrow { margin-bottom: 10px; }
.admin-card { border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(23,32,25,.025); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-grid article { position: relative; display: flex; flex-direction: column; min-height: 167px; padding: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.stat-grid article > small { margin-top: 26px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.stat-grid article > strong { font-size: 35px; letter-spacing: -1.5px; }
.stat-grid article > em { color: var(--muted); font-size: 9px; font-style: normal; }
.stat-icon { position: absolute; right: 18px; top: 18px; display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; font-size: 11px; font-weight: 850; }
.tone-lime { background: var(--lime); }
.tone-violet { background: var(--violet); }
.tone-blue { background: var(--blue); }
.tone-coral { background: var(--coral); }
.dashboard-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 20px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 23px; border-bottom: 1px solid var(--line); }
.card-heading > div { display: flex; flex-direction: column; }
.card-heading small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: 1.1px; }
.card-heading h2 { margin: 2px 0 0; font-size: 18px; letter-spacing: -.6px; }
.card-heading > a { font-size: 10px; font-weight: 750; }
.compact-list { display: grid; }
.compact-list > a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 15px 22px; border-bottom: 1px solid var(--line); }
.compact-list > a:last-child { border-bottom: 0; }
.compact-list > a:hover { background: #fafbf8; }
.compact-list > a > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.compact-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.compact-list small { color: var(--muted); font-size: 9px; }
.date-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 45px; height: 48px; border-radius: 10px; background: var(--coral); font-size: 7px; font-weight: 850; line-height: 1.1; }
.date-tile b { font-size: 17px; }
.date-tile.small { width: 39px; height: 42px; }
.activity-list { padding: 6px 23px 14px; }
.activity-list > div { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.activity-list > div:last-child { border: 0; }
.activity-list i { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(202,255,102,.22); }
.activity-list span { display: flex; flex-direction: column; }
.activity-list strong { font-size: 10px; text-transform: capitalize; }
.activity-list small { color: var(--muted); font-size: 8px; }
.admin-empty { padding: 58px 25px; text-align: center; }
.admin-empty.compact { padding: 37px 20px; }
.admin-empty strong { font-size: 16px; }
.admin-empty p { margin: 6px 0 15px; color: var(--muted); }
.admin-empty a { border-bottom: 1px solid var(--ink); font-weight: 750; }

.status { display: inline-flex; align-items: center; gap: 5px; width: max-content; padding: 5px 8px; border-radius: 999px; background: #eef0ed; color: #59635c; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.status::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.status-published, .status-active { background: #e8f7ed; color: #297044; }
.status-draft, .status-pending { background: #fff5d9; color: #87651e; }
.status-cancelled, .status-suspended { background: #ffeded; color: #a43b3b; }
.status-completed { background: #eeebff; color: #5544a8; }
.status-registered { background: #e8f7ed; color: #297044; }
.status-waitlisted { background: #fff5d9; color: #87651e; }
.status-checked_in { background: #e8f2ff; color: #275b91; }

.filter-card { margin-bottom: 17px; padding: 16px; }
.filter-form { display: flex; align-items: flex-end; gap: 12px; }
.filter-form label { display: flex; flex: 0 1 280px; flex-direction: column; gap: 5px; }
.filter-form label.grow { flex-grow: 1; }
.filter-form input, .filter-form select { min-height: 42px; }
.clear-filter { align-self: center; margin-top: 18px; color: var(--muted); font-size: 10px; font-weight: 700; }
.table-card { overflow: visible; }
.table-scroll { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { padding: 13px 17px; border-bottom: 1px solid var(--line); background: #fafbf8; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .7px; text-align: left; text-transform: uppercase; }
.admin-table td { padding: 14px 17px; border-bottom: 1px solid var(--line); font-size: 10px; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td > strong, .admin-table td > small { display: block; }
.admin-table td > small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.event-cell, .person-cell { display: flex; align-items: center; gap: 11px; min-width: 210px; }
.event-cell > span:last-child, .person-cell > div { display: flex; flex-direction: column; }
.event-cell small, .person-cell small { color: var(--muted); font-size: 8px; }
.person-cell > span { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; }
.row-actions { position: relative; display: flex; align-items: center; gap: 10px; min-width: 120px; font-size: 9px; font-weight: 750; }
.row-actions > a { border-bottom: 1px solid var(--line); }
.row-actions details { position: relative; }
.row-actions summary { cursor: pointer; list-style: none; }
.action-menu { position: absolute; right: 0; top: 23px; z-index: 5; width: 145px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.action-menu button { width: 100%; padding: 7px 9px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; font-size: 9px; text-align: left; }
.action-menu button:hover { background: var(--paper); }

.event-builder { display: grid; gap: 18px; padding-bottom: 70px; }
.form-card { padding: 25px; }
.narrow-card { max-width: 660px; }
.form-section-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.form-section-heading > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--ink); color: var(--lime); font-size: 9px; font-weight: 850; }
.form-section-heading h2 { margin: 0; font-size: 18px; }
.form-section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.admin-form { display: grid; gap: 17px; }
.admin-form.two-column { grid-template-columns: 1fr 1fr; }
.field.full { grid-column: 1 / -1; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkbox-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.checkbox-grid legend { width: 100%; margin-bottom: 7px; font-size: 11px; font-weight: 750; }
.checkbox-grid label { cursor: pointer; }
.checkbox-grid input { position: absolute; opacity: 0; }
.checkbox-grid span { display: inline-flex; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 9px; font-weight: 700; }
.checkbox-grid input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.switch-field { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; }
.switch-field input { width: 17px; height: 17px; accent-color: var(--ink); }
.switch-field span { display: flex; flex-direction: column; }
.switch-field small { color: var(--muted); font-size: 9px; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 7px; }
.sticky-save { position: sticky; bottom: 18px; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 16px 13px 21px; border: 1px solid rgba(23,32,25,.14); border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: 0 15px 45px rgba(23,32,25,.14); backdrop-filter: blur(10px); }
.sticky-save > a { color: var(--muted); font-size: 11px; }
.sticky-save > div { display: flex; align-items: center; gap: 17px; }
.sticky-save > div > span { color: var(--muted); font-size: 9px; }

.management-grid { display: grid; grid-template-columns: .55fr 1.45fr; gap: 18px; align-items: start; }
.category-list-card { overflow: hidden; }
.category-admin-list details { border-bottom: 1px solid var(--line); }
.category-admin-list details:last-child { border: 0; }
.category-admin-list summary { display: flex; align-items: center; justify-content: space-between; padding: 15px 21px; cursor: pointer; list-style: none; }
.category-admin-list summary > span { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; }
.category-admin-list summary i { grid-row: 1 / 3; width: 8px; height: 8px; border-radius: 50%; background: #aaa; }
.category-admin-list summary i.is-on { background: #3aa25f; box-shadow: 0 0 0 4px #e7f6ec; }
.category-admin-list summary strong { font-size: 11px; }
.category-admin-list summary small { grid-column: 2; color: var(--muted); font-size: 8px; }
.category-admin-list summary em { color: var(--muted); font-size: 9px; font-style: normal; }
.inline-edit-form { display: grid; grid-template-columns: 1fr 95px auto auto; align-items: end; gap: 10px; padding: 14px 21px; background: #fafbf8; }
.inline-edit-form label { display: flex; flex-direction: column; gap: 5px; }
.inline-edit-form input { min-height: 40px; }
.inline-edit-form .inline-check { flex-direction: row; align-items: center; align-self: center; margin-top: 15px; font-size: 10px; }
.inline-edit-form .inline-check input { width: auto; min-height: 0; }
.organization-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px; }
.organization-card { position: relative; overflow: hidden; padding: 24px; }
.organization-mark { position: absolute; right: -14px; top: -20px; display: grid; place-items: center; width: 100px; height: 100px; border-radius: 50%; background: var(--lime); font-size: 26px; font-weight: 850; opacity: .65; }
.organization-card-head { position: relative; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.organization-card-head small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.organization-card h2 { margin: 3px 0 0; font-size: 22px; letter-spacing: -.8px; }
.organization-card dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px; margin: 21px 0 0; }
.organization-card dl div { display: flex; flex-direction: column; }
.organization-card dt { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.organization-card dd { margin: 3px 0 0; font-size: 10px; font-weight: 700; }
.organization-card dd small { display: block; color: var(--muted); font-size: 8px; font-weight: 400; }
.admin-table code { padding: 3px 5px; border-radius: 4px; background: var(--paper); font-size: 8px; }
.organization-url-builder { display: flex; align-items: center; min-height: 58px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.organization-url-builder strong { flex: 0 0 auto; padding: 0 0 0 16px; font-size: 13px; }
.organization-url-builder input { flex: 1; min-width: 0; min-height: 56px; padding: 0 16px 0 0; border: 0; outline: 0; background: transparent; color: #584fd2; font-size: 13px; font-weight: 800; }
.field-help { display: block; margin-top: 8px; color: var(--muted); font-size: 9px; }
.guest-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 17px; }
.guest-stat-grid article { display: flex; flex-direction: column; padding: 17px 19px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.guest-stat-grid small { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .8px; }
.guest-stat-grid strong { font-size: 27px; }
.guest-note { max-width: 320px; margin: 8px 0 0 45px !important; padding: 7px 9px; border-radius: 8px; background: var(--paper); }
.guest-actions { flex-wrap: wrap; min-width: 180px; }
.guest-action-button { min-height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 8px; font-weight: 800; }
.guest-action-button.is-primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.organizer-mobile-nav { display: none; }

@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .management-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1040px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-story { min-height: 340px; padding: 35px 27px; }
    .auth-story h1 { font-size: 50px; }
    .auth-story::before { opacity: .24; }
    .auth-panel { padding: 45px 24px; }
    .admin-shell { display: block; }
    .admin-sidebar { inset: 0 auto 0 0; z-index: 40; width: min(84vw, 330px); padding: 20px 18px 24px; overflow-y: auto; box-shadow: 28px 0 70px rgba(0,0,0,.28); transform: translateX(-105%); transition: transform .28s cubic-bezier(.22,.8,.3,1); }
    .admin-menu-open .admin-sidebar { transform: translateX(0); }
    .admin-drawer-head { margin-bottom: 20px; }
    .admin-brand { padding: 0; }
    .admin-sidebar nav { display: grid; gap: 6px; }
    .admin-sidebar nav a { min-height: 49px; padding: 13px 15px; font-size: 13px; }
    .admin-sidebar-foot { display: grid; }
    .admin-sidebar-foot a, .admin-sidebar-foot button { min-height: 44px; padding: 11px 12px; }
    .admin-menu-close { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: rgba(255,255,255,.07); color: #fff; cursor: pointer; font-size: 28px; line-height: 1; }
    .admin-drawer-overlay { position: fixed; inset: 0; z-index: 35; display: block; border: 0; background: rgba(11,16,12,.58); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
    .admin-menu-open .admin-drawer-overlay { opacity: 1; pointer-events: auto; }
    .admin-main { min-width: 0; }
    .admin-topbar { position: sticky; top: 0; z-index: 20; min-height: 68px; padding: 0 16px; }
    .admin-menu-toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; cursor: pointer; font-size: 11px; font-weight: 800; }
    .admin-menu-icon { display: grid; gap: 3px; width: 17px; }
    .admin-menu-icon i { display: block; width: 100%; height: 2px; border-radius: 2px; background: var(--ink); }
    .admin-topbar-title { min-width: 0; margin: 0 auto 0 13px; }
    .admin-topbar-title small { display: none; }
    .admin-topbar-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
    .admin-user-chip div { display: none; }
    .admin-user-chip > span { width: 38px; height: 38px; }
    .admin-content { padding: 27px 16px 55px; }
    .page-heading-actions { align-items: flex-start; flex-direction: column; }
    .page-heading-actions .admin-button { width: 100%; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .admin-form.two-column, .organization-grid { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .filter-form { align-items: stretch; flex-direction: column; }
    .filter-form label { flex-basis: auto; }
    .clear-filter { margin-top: 0; }
    .inline-edit-form { grid-template-columns: 1fr 1fr; }
    .sticky-save { align-items: stretch; flex-direction: column; }
    .sticky-save > div { align-items: stretch; flex-direction: column; }
    .sticky-save > div > span { display: none; }
    .guest-stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .admin-content { padding: 24px 13px 48px; }
    .page-heading { margin-bottom: 23px; }
    .page-heading h1 { font-size: 37px; letter-spacing: -1.8px; }
    .page-heading > div > p:last-child, .page-heading > p:last-child { font-size: 12px; }
    .form-card { padding: 19px; }
    .filter-card { padding: 13px; }
    .filter-form .admin-button { width: 100%; }
    .table-card { border: 0; background: transparent; box-shadow: none; }
    .table-scroll { overflow: visible; }
    .admin-table, .admin-table tbody { display: block; width: 100%; }
    .admin-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .admin-table tr { display: grid; gap: 0; margin-bottom: 12px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(23,32,25,.035); }
    .admin-table td { display: grid; grid-template-columns: minmax(82px, .4fr) minmax(0, 1fr); align-items: center; gap: 12px; min-height: 44px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 11px; text-align: right; }
    .admin-table td::before { align-self: center; color: var(--muted); content: attr(data-label); font-size: 8px; font-weight: 850; letter-spacing: .7px; text-align: left; text-transform: uppercase; }
    .admin-table td:last-child { border-bottom: 0; }
    .admin-table td > strong, .admin-table td > small { justify-self: end; }
    .admin-table td > .status { justify-self: end; }
    .admin-table td > small { grid-column: 2; margin-top: -8px; }
    .admin-table td:first-child { display: block; padding: 13px 0; text-align: left; }
    .admin-table td:first-child::before { display: none; }
    .event-cell, .person-cell { min-width: 0; }
    .event-cell { align-items: center; }
    .event-cell > span:last-child, .person-cell > div { min-width: 0; }
    .event-cell strong, .person-cell strong, .person-cell small { overflow-wrap: anywhere; }
    .row-actions { justify-content: flex-end; min-width: 0; }
    .row-actions a, .row-actions summary { min-height: 40px; display: inline-flex; align-items: center; }
    .action-menu { right: 0; top: 42px; }
    .organization-card { padding: 19px; }
    .organization-card-head { align-items: flex-start; flex-direction: column; gap: 11px; }
    .category-admin-list summary { padding: 15px 17px; }
    .sticky-save { bottom: 10px; padding: 12px; }
    .sticky-save .admin-button { width: 100%; }
    .guest-actions { justify-content: flex-end; min-width: 0; }
    .guest-note { margin-left: 0 !important; }
    .organization-url-builder { align-items: stretch; flex-direction: column; padding: 12px 14px; }
    .organization-url-builder strong { padding: 0; font-size: 11px; }
    .organization-url-builder input { width: 100%; min-height: 38px; padding: 0; font-size: 12px; }
}

@media (max-width: 470px) {
    .stat-grid { grid-template-columns: 1fr; }
    .field-pair, .organization-card dl { grid-template-columns: 1fr; }
    .inline-edit-form { grid-template-columns: 1fr; }
    .auth-form-wrap h2 { font-size: 36px; }
    .auth-field-pair { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}

/* Purpose-built phone and tablet workspace. */
@media (max-width: 1040px) {
    .auth-body {
        background: var(--paper);
    }

    .auth-wrap {
        display: block;
        min-height: 100svh;
    }

    .auth-story {
        display: block;
        min-height: 0;
        padding: 21px 20px 25px;
        border-radius: 0 0 28px 28px;
    }

    .auth-story::before {
        right: -66px;
        bottom: -87px;
        width: 190px;
        height: 190px;
        border-width: 34px;
        opacity: .3;
    }

    .auth-story::after {
        right: 20px;
        top: 18px;
        width: 46px;
        height: 46px;
        border-width: 13px;
        opacity: .55;
    }

    .auth-brand {
        gap: 8px;
        font-size: 20px;
    }

    .auth-brand span {
        width: 31px;
        height: 31px;
        border-radius: 11px;
        font-size: 23px;
    }

    .auth-story > div {
        margin-top: 22px;
    }

    .auth-kicker {
        margin-bottom: 7px;
        font-size: 8px;
    }

    .auth-story h1 {
        max-width: 520px;
        font-size: clamp(32px, 8.8vw, 47px);
        letter-spacing: -2px;
        line-height: .96;
    }

    .auth-story > div > p:last-child,
    .auth-story > small {
        display: none;
    }

    .auth-panel {
        display: block;
        min-height: 0;
        padding: 30px 18px 42px;
    }

    .auth-form-wrap {
        width: min(100%, 620px);
        margin: 0 auto;
    }

    .auth-form-wrap h2 {
        font-size: clamp(34px, 8.5vw, 43px);
        letter-spacing: -1.8px;
    }

    .auth-intro {
        margin: 10px 0 25px;
        font-size: 12px;
    }

    .auth-form {
        gap: 15px;
    }

    .auth-form input,
    .auth-form select {
        min-height: 53px;
        border-radius: 13px;
        font-size: 16px;
    }

    .auth-form .admin-button {
        min-height: 54px;
        border-radius: 15px;
    }

    .organizer-register-panel {
        overflow: visible;
    }

    .organizer-register-wrap {
        padding: 0;
    }

    .organizer-mobile-nav {
        position: fixed;
        right: 12px;
        bottom: max(10px, env(safe-area-inset-bottom));
        left: 12px;
        z-index: 34;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        width: min(calc(100% - 24px), 520px);
        min-height: 68px;
        margin: 0 auto;
        padding: 7px;
        border: 1px solid rgba(255,255,255,.1);
        border-radius: 22px;
        background: rgba(35, 32, 82, .97);
        color: #fff;
        box-shadow: 0 18px 45px rgba(17,14,52,.3);
        backdrop-filter: blur(18px);
    }

    .organizer-mobile-nav a,
    .organizer-mobile-nav button {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
        border-radius: 16px;
        color: #a9a0de;
    }

    .organizer-mobile-nav button {
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
        font: inherit;
    }

    .organizer-mobile-nav a.is-active {
        background: rgba(255,255,255,.09);
        color: #fff;
    }

    .organizer-mobile-nav a span,
    .organizer-mobile-nav button span {
        display: grid;
        place-items: center;
        width: 27px;
        height: 27px;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 850;
    }

    .organizer-mobile-nav a.is-active span {
        background: var(--violet);
        color: #232052;
    }

    .organizer-mobile-nav button span {
        width: 38px;
        height: 38px;
        margin-top: -17px;
        border: 4px solid #fff;
        border-radius: 50%;
        background: #584fd2;
        color: #fff;
        box-sizing: content-box;
        box-shadow: 0 8px 20px rgba(88,79,210,.3);
        font-size: 23px;
        font-weight: 500;
    }

    .organizer-mobile-nav a small,
    .organizer-mobile-nav button small {
        overflow: hidden;
        max-width: 100%;
        font-size: 8px;
        font-weight: 750;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .organizer-body {
        padding-bottom: calc(88px + env(safe-area-inset-bottom));
    }

    .organizer-body .admin-topbar {
        min-height: 64px;
        padding: 0 13px;
    }

    .organizer-body .admin-menu-toggle {
        justify-content: center;
        width: 42px;
        min-height: 42px;
        padding: 0;
    }

    .organizer-body .admin-menu-toggle > span:last-child {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .organizer-body .admin-content {
        padding: 25px 14px 112px;
    }

    .organizer-body .page-heading {
        margin-bottom: 22px;
    }

    .organizer-body .page-heading h1 {
        font-size: clamp(32px, 8.5vw, 43px);
        letter-spacing: -1.8px;
    }

    .organizer-body .stat-grid,
    .organizer-body .guest-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .organizer-body .stat-grid article {
        min-height: 118px;
        padding: 16px;
        border-radius: 16px;
    }

    .organizer-body .stat-grid article > small {
        margin-top: 19px;
    }

    .organizer-body .stat-grid article > strong {
        font-size: 29px;
    }

    .organizer-body .stat-icon {
        right: 13px;
        top: 13px;
        width: 31px;
        height: 31px;
    }

    .organizer-body .admin-card,
    .organizer-body .form-card,
    .organizer-body .organization-card,
    .organizer-body .admin-table tr {
        border-radius: 17px;
    }

    .organizer-body .card-heading {
        padding: 18px;
    }

    .organizer-body .compact-list > a {
        padding: 14px 17px;
    }
}

@media (max-width: 470px) {
    .organizer-body .stat-grid,
    .organizer-body .guest-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-field-pair {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1040px) {
    .organizer-mobile-nav {
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        min-height: calc(68px + env(safe-area-inset-bottom));
        padding: 7px max(10px, calc((100vw - 600px) / 2)) env(safe-area-inset-bottom);
        border: 0;
        border-top: 1px solid var(--line);
        border-radius: 0;
        background: rgba(255,255,255,.97);
        color: var(--muted);
        box-shadow: 0 -10px 30px rgba(23,32,25,.07);
    }

    .organizer-mobile-nav a,
    .organizer-mobile-nav button {
        color: var(--muted);
    }

    .organizer-mobile-nav a.is-active {
        background: transparent;
        color: #584fd2;
    }

    .organizer-mobile-nav a.is-active span {
        background: rgba(88,79,210,.1);
        color: #584fd2;
    }
}

.event-template-banner {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 16px 18px;
    margin: 0 0 18px;
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(135deg, #211d4d, #30266f);
    color: #fff;
    box-shadow: 0 18px 42px rgba(31, 27, 72, .16);
}
.event-template-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 19px; color: #172019; font-size: 14px; font-weight: 900; letter-spacing: .6px; }
.event-template-mark.tone-lime { background: #caff66; }
.event-template-mark.tone-violet { background: #b7a8ff; }
.event-template-mark.tone-coral { background: #ff8066; }
.event-template-mark.tone-blue { background: #8bd8ee; }
.event-template-banner small { color: #c9c2fb; font-size: 10px; font-weight: 850; letter-spacing: 1.3px; }
.event-template-banner h2 { margin: 4px 0 3px; color: #fff; font-size: 22px; letter-spacing: -.5px; }
.event-template-banner p { margin: 0; color: #dfdcf7; font-size: 13px; line-height: 1.45; }
.event-template-checklist { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.event-template-checklist span { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px 11px; border-radius: 11px; background: rgba(255,255,255,.09); color: #f8f7ff; font-size: 11px; font-weight: 720; }
.event-template-checklist i { display: grid; place-items: center; flex: 0 0 19px; width: 19px; height: 19px; border-radius: 50%; background: #caff66; color: #172019; font-size: 10px; font-style: normal; }

@media (max-width: 560px) {
    .event-template-banner { grid-template-columns: 52px minmax(0, 1fr); padding: 17px; border-radius: 18px; }
    .event-template-mark { width: 52px; height: 52px; border-radius: 15px; font-size: 12px; }
    .event-template-banner h2 { font-size: 18px; }
    .event-template-checklist { grid-template-columns: 1fr; gap: 6px; }
}

.status-approved { background:#e6f8dd; color:#3d6a28; }
.status-rejected { background:#ffebe7; color:#903f33; }
.memorial-admin-stats { grid-template-columns:repeat(2,minmax(0,1fr)); max-width:650px; }
.memorial-admin-layout { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(320px,.75fr); gap:24px; align-items:start; }
.memorial-review-list,.memorial-story-review-list { display:grid; gap:13px; }
.memorial-review-card { display:grid; grid-template-columns:150px minmax(0,1fr); overflow:hidden; }
.memorial-review-card>img,.memorial-review-initial { width:150px; height:100%; min-height:250px; object-fit:cover; }
.memorial-review-initial { display:grid; place-items:center; background:#e9e5ff; color:#5b4db8; font-size:55px; font-weight:850; }
.memorial-review-copy { padding:20px; }
.memorial-review-copy>div:first-child { display:flex; align-items:center; justify-content:space-between; gap:15px; }
.memorial-review-copy>div:first-child p { margin:0; color:var(--muted); font-size:10px; }
.memorial-review-copy h3 { margin:10px 0 4px; font-size:24px; }
.memorial-review-copy code { color:#5d50c7; font-size:11px; overflow-wrap:anywhere; }
.memorial-review-copy>p { color:#586159; font-size:12px; line-height:1.55; }
.memorial-review-copy dl { display:grid; grid-template-columns:2fr 1fr 1fr; gap:7px; margin:14px 0; }
.memorial-review-copy dl div { padding:9px; border-radius:9px; background:#f6f6f2; }
.memorial-review-copy dt { color:var(--muted); font-size:8px; font-weight:800; text-transform:uppercase; }
.memorial-review-copy dd { margin:4px 0 0; font-size:11px; font-weight:700; }
.memorial-review-copy dd small { display:block; color:var(--muted); font-size:9px; font-weight:500; }
.memorial-review-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.memorial-review-actions>a { color:#584fd2; font-size:11px; font-weight:750; }
.memorial-review-actions form,.memorial-story-review-list form { display:flex; gap:7px; margin-left:auto; }
.memorial-review-actions button,.memorial-story-review-list button { padding:9px 11px; border:1px solid var(--line); border-radius:9px; background:#fff; cursor:pointer; font-size:10px; font-weight:750; }
.memorial-review-actions button.is-primary,.memorial-story-review-list button.is-primary { border-color:#584fd2; background:#584fd2; color:#fff; }
.memorial-story-review-list article { padding:18px; }
.memorial-story-review-list article>small { color:#675acb; font-size:8px; font-weight:850; letter-spacing:1px; }
.memorial-story-review-list blockquote { margin:11px 0; color:#485049; font:14px/1.55 Georgia,serif; }
.memorial-story-review-list article>p { color:#555e57; font-size:11px; }
.memorial-story-review-list article>p span { color:var(--muted); }
.memorial-story-review-images { display:grid; grid-template-columns:repeat(3,1fr); gap:5px; margin:12px 0; }
.memorial-story-review-images img { width:100%; aspect-ratio:1; border-radius:8px; object-fit:cover; }
@media (max-width:1000px) { .memorial-admin-layout { grid-template-columns:1fr; } }
@media (max-width:620px) {
    .memorial-admin-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .memorial-review-card { grid-template-columns:1fr; }
    .memorial-review-card>img,.memorial-review-initial { width:100%; height:190px; min-height:0; }
    .memorial-review-copy dl { grid-template-columns:1fr 1fr; }
    .memorial-review-copy dl div:first-child { grid-column:1/-1; }
    .memorial-review-actions { align-items:stretch; flex-direction:column; }
    .memorial-review-actions form { width:100%; margin:0; }
    .memorial-review-actions button { flex:1; }
}
