:root {
    --bg: #f6f7fb;
    --panel: #ffffff;
    --border: #e6e8ef;
    --text: #1b2230;
    --muted: #6c7380;
    --primary: #2563eb;
    --primary-dark: #1e4fc4;
    --danger: #dc2626;
    --success-bg: #ecfdf3;
    --success-text: #065f46;
    --error-bg: #fef2f2;
    --error-text: #991b1b;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(16,24,40,.06);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
code { background: #eef2ff; padding: 2px 6px; border-radius: 8px; }
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: #111827; color: #fff; padding: 28px 20px; display: flex; flex-direction: column; gap: 24px; }
.brand { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.nav { display: grid; gap: 10px; }
.nav a { color: rgba(255,255,255,.9); padding: 12px 14px; border-radius: 12px; }
.nav a:hover { background: rgba(255,255,255,.08); }
.sidebar-foot { margin-top: auto; padding: 10px 0 0; }
.logout-form { margin-top: 10px; }
.main { flex: 1; padding: 32px; }
.main-auth { max-width: 780px; margin: 0 auto; width: 100%; display: grid; place-items: center; }
.auth-card, .panel, .stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-card { width: 100%; max-width: 460px; padding: 28px; }
.auth-card-wide { max-width: 720px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-header h1 { margin: 0 0 8px; font-size: 32px; }
.panel { padding: 24px; margin-bottom: 24px; }
.form-grid { display: grid; gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
label { display: grid; gap: 8px; font-weight: 600; }
input, select, textarea, button { font: inherit; }
input, select, textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: #fff; color: var(--text); }
textarea { resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: var(--primary); color: #fff; padding: 12px 16px; border-radius: 12px; cursor: pointer; font-weight: 600; }
.btn:hover { background: var(--primary-dark); }
.btn-secondary { background: #eef2ff; color: #1e3a8a; }
.btn-danger { background: var(--danger); }
.btn-full { width: 100%; }
.muted { color: var(--muted); }
.small-text { font-size: 12px; }
.mt-16 { margin-top: 16px; }
.alert { margin-bottom: 20px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); }
.alert-success { background: var(--success-bg); color: var(--success-text); }
.alert-error { background: var(--error-bg); color: var(--error-text); }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; margin-bottom: 24px; }
.stats-grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.stat-card { padding: 22px; }
.stat-label { display: block; color: var(--muted); margin-bottom: 10px; }
.stat-value { font-size: 28px; letter-spacing: -0.03em; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.badge { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-size: 12px; font-weight: 700; }
.text-right { text-align: right; }
.actions { display: flex; gap: 10px; align-items: center; }
.empty-state { text-align: center; padding: 40px 20px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-list { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; }
.detail-list dt { color: var(--muted); }
.check-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.feature-grid, .action-panels { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.mini-card, .module-card { border: 1px solid var(--border); border-radius: 14px; padding: 18px; background: #fff; display: grid; gap: 8px; }
.module-card:hover { border-color: #cfd7e6; box-shadow: var(--shadow); }
.actions-right { justify-content: flex-end; }
.btn-small { padding: 9px 12px; font-size: 13px; }
.compact-grid { align-items: end; }
.align-end { align-items: end; }
.checkbox-row { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.public-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.panel-soft { background: #f8fafc; border-style: dashed; }
.mb-0 { margin-bottom: 0; }
.simple-header { margin-bottom: 14px; }
.wrap-actions { flex-wrap: wrap; }
@media (max-width: 960px) {
    .shell { display: block; }
    .sidebar { width: 100%; }
    .main { padding: 20px; }
    .stats-grid, .grid-2, .detail-grid, .feature-grid, .action-panels, .stats-grid-4 { grid-template-columns: 1fr; }
    .page-header { display: grid; grid-template-columns: 1fr; }
}

.list-tight { margin: .25rem 0 0; padding-left: 1rem; }
.list-tight li { margin: .2rem 0; }
.inline-form { display:flex; gap:.5rem; align-items:center; }
.small-input { width:82px; padding:.65rem .8rem; border:1px solid #d8dbe2; border-radius:10px; background:#fff; }

.brand-wrap { display:flex; gap:14px; align-items:center; }
.brand-logo { width:40px; height:40px; object-fit:contain; border-radius:12px; background:#fff; padding:4px; }
.sidebar-subtitle { color: rgba(255,255,255,.65); font-size: 12px; margin-top: 4px; }
.dashboard-grid-3 { margin-bottom: 24px; }
.compact-panel { margin-bottom: 0; }
.role-select { min-width: 120px; }
.brand-preview-panel { align-self: start; }
.brand-preview { display:grid; gap:16px; background: linear-gradient(135deg, var(--preview-secondary), color-mix(in srgb, var(--preview-primary) 35%, white)); border-radius: 18px; padding: 20px; color: #fff; }
.brand-preview-header { display:flex; gap:12px; align-items:center; }
.brand-preview-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 18px; display:grid; gap:12px; }
.inline-form select.small-input { width:auto; min-width:110px; }
@media (max-width: 960px) {
  .brand-wrap { align-items:flex-start; }
}

.public-page-body {
    background: linear-gradient(180deg, #f7f7f5 0%, #f1f3f7 100%);
}
.public-shell {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 20px 56px;
}
.public-alert { margin-top: 10px; }
.public-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 24px;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .08);
    padding: 26px;
    display: grid;
    gap: 22px;
}
.public-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
}
.public-brand-wrap { gap: 12px; }
.public-brand-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.public-brand-subtitle { margin-top: 4px; }
.public-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .08);
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
}
.public-event-block {
    display: grid;
    gap: 18px;
}
.public-event-copy h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.08;
    letter-spacing: -0.03em;
}
.public-event-description {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.65;
}
.public-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.public-fact,
.public-address,
.public-guest-strip {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 16px;
    padding: 14px 16px;
}
.public-fact-label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 6px;
}
.public-address { line-height: 1.6; }
.public-guest-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.public-guest-name {
    display: block;
    font-size: 18px;
    margin-top: 2px;
}
.public-guest-note {
    max-width: 280px;
    text-align: right;
}
.public-form-card {
    gap: 20px;
}
.public-section-head h3 {
    margin: 0 0 4px;
    font-size: 18px;
}
.public-section-head.compact { margin-bottom: -4px; }
.public-choice-grid-clean {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.public-choice-card-clean {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    padding: 16px;
    display: grid;
    gap: 6px;
    align-content: start;
    background: #fff;
    cursor: pointer;
    transition: .18s ease;
}
.public-choice-card-clean:hover {
    border-color: rgba(37, 99, 235, .28);
    transform: translateY(-1px);
}
.public-choice-card-clean input { display: none; }
.public-choice-card-clean.is-selected,
.public-choice-card-clean:has(input:checked) {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(37, 99, 235, .06) 0%, rgba(37, 99, 235, .02) 100%);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .08);
}
.public-choice-title {
    font-weight: 700;
}
.public-choice-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}
.public-dynamic-fields.is-hidden { display: none; }
.public-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.public-detail-grid-wide { grid-column: 1 / -1; }
.public-submit-row.clean {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.public-footer-note {
    margin: 0;
    max-width: 340px;
}
.public-submit-btn {
    min-width: 190px;
    border-radius: 14px;
}
.state-card { text-align: center; min-height: 220px; place-content: center; }
@media (max-width: 960px) {
    .public-shell { padding: 18px 14px 32px; }
    .public-card { padding: 18px; border-radius: 20px; gap: 18px; }
    .public-head,
    .public-guest-strip,
    .public-submit-row.clean { grid-template-columns: 1fr; display: grid; }
    .public-facts,
    .public-choice-grid-clean,
    .public-detail-grid { grid-template-columns: 1fr; }
    .public-event-copy h1 { font-size: 28px; }
    .public-guest-note { max-width: none; text-align: left; }
    .public-submit-btn { width: 100%; min-width: 0; }
}
