:root {
    --bg: #f3f4f5;
    --bg-accent: #ebedef;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-strong: #ffffff;
    --surface-soft: #f7f7f8;
    --ink: #22262b;
    --ink-soft: #4d535b;
    --muted: #757c86;
    --line: #d8dde3;
    --line-strong: #c2c9d1;
    --accent: #5c636d;
    --accent-strong: #2f343a;
    --accent-soft: #eceef1;
    --success: #22866c;
    --success-soft: rgba(34, 134, 108, 0.12);
    --danger: #b63737;
    --danger-soft: rgba(182, 55, 55, 0.1);
    --shadow-sm: 0 10px 26px rgba(34, 38, 43, 0.06);
    --shadow-md: 0 20px 54px rgba(34, 38, 43, 0.1);
    --shadow-lg: 0 34px 80px rgba(34, 38, 43, 0.14);
    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 28px;
}

.status-button.status-scheduled {
    background: rgba(47, 52, 58, 0.12);
    color: #2f343a;
}

.event-ticket-meta,
.event-ticket-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.event-ticket-meta {
    margin-top: 18px;
}

.event-ticket-actions {
    margin: 0 0 28px;
}

.is-hidden-field {
    display: none;
}

.table-controls,
.bulk-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.bulk-actions {
    justify-content: space-between;
    margin-bottom: 18px;
}

.checkbox-cell {
    width: 52px;
    text-align: center;
}

.attachment-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 96px;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #f6fbff;
}

.attachment-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-preview-fallback {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(103, 110, 118, 0.08), transparent 32%),
        radial-gradient(circle at top right, rgba(226, 229, 233, 0.9), transparent 24%),
        linear-gradient(180deg, #fafafa 0%, #f2f3f5 48%, #edeff1 100%);
    font-family: "SUIT Variable", "SUIT", "Pretendard Variable", "Pretendard", "Noto Sans KR", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.public-body {
    background: #fff;
}

body.has-modal {
    overflow: hidden;
}

body.public-body.is-embedded {
    --embedded-topbar-offset: 140px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

button,
input,
textarea,
select {
    font: inherit;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.public-body,
.admin-body {
    min-height: 100vh;
}

.calendar-shell,
.event-shell,
.auth-shell {
    width: min(1560px, calc(100% - 24px));
    margin: 28px auto;
}

.calendar-shell {
    margin-top: 40px;
}

.calendar-shell,
.event-shell,
.auth-card,
.panel,
.stat-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(207, 224, 237, 0.88);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.calendar-shell,
.event-shell,
.panel {
    padding: 28px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent-strong);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
    font-weight: 800;
}

.muted,
.table-sub,
.detail-card span,
.lead {
    color: var(--muted);
}

.button,
.inline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: linear-gradient(180deg, #50555d 0%, #2f343a 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(34, 38, 43, 0.16);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.button:hover,
.inline-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(34, 38, 43, 0.22);
    background: linear-gradient(180deg, #454a51 0%, #262a30 100%);
}

.button-ghost {
    background: rgba(255, 255, 255, 0.6);
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: none;
}

.button-ghost:hover {
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.button-danger {
    background: rgba(182, 55, 55, 0.1);
    color: #8f2020;
    border-color: rgba(182, 55, 55, 0.22);
}

.button-danger:hover {
    background: rgba(182, 55, 55, 0.16);
    border-color: rgba(182, 55, 55, 0.34);
}

.danger {
    background: transparent;
    color: var(--danger);
    box-shadow: none;
    padding: 0;
}

.inline-link {
    color: var(--accent-strong);
    font-weight: 700;
}

.calendar-top,
.panel-head,
.admin-topbar,
.filter-bar,
.form-actions,
.topbar-actions,
.calendar-modal-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.calendar-top {
    display: grid;
    gap: 16px;
    align-items: stretch;
    justify-content: stretch;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(207, 224, 237, 0.7);
}

.calendar-top h1,
.admin-topbar h1,
.event-copy h1 {
    margin-bottom: 0;
    letter-spacing: -0.03em;
}

.calendar-top-sticky {
    position: sticky;
    top: 12px;
    z-index: 20;
    margin: -4px 0 10px;
    padding: 14px 18px;
    border: 1px solid rgba(207, 224, 237, 0.92);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(54, 102, 143, 0.08);
    backdrop-filter: blur(12px);
}

body.public-body.is-embedded .calendar-shell {
    margin-top: 40px;
    padding-top: 0;
}

body.public-body.is-embedded .calendar-top-sticky {
    position: fixed;
    top: 0;
    left: 50%;
    width: min(1560px, calc(100vw - 24px));
    margin: 0;
    transform: translateX(-50%);
    z-index: 100;
}

.calendar-top-meta {
    display: grid;
    gap: 2px;
}

.calendar-top-main {
    display: flex;
    align-items: end;
    justify-content: space-between;
    min-height: 0;
    width: 100%;
}

.calendar-current-label {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.calendar-group-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
}

.calendar-filter-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.calendar-top-spacer {
    height: 20px;
}

.calendar-month-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.calendar-month-nav-center {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-height: 52px;
}

.calendar-month-nav-label {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--ink);
}

.month-nav-arrow,
.month-nav-today {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(216, 221, 227, 0.94);
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    font-weight: 700;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        border-color 0.16s ease,
        background 0.16s ease;
}

.month-nav-arrow {
    width: 42px;
    padding: 0;
    font-size: 1.5rem;
    line-height: 1;
}

.month-nav-arrow:hover,
.month-nav-today:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    border-color: var(--line-strong);
    background: #fff;
}

.calendar-group-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(207, 224, 237, 0.92);
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink-soft);
    font-weight: 700;
    box-shadow: none;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        border-color 0.16s ease,
        background 0.16s ease,
        color 0.16s ease;
}

.calendar-group-chip:hover,
.calendar-group-chip.is-active {
    transform: translateY(-1px);
    border-color: rgba(47, 52, 58, 0.18);
    background: #f3f4f6;
    color: var(--ink);
    box-shadow: 0 8px 16px rgba(34, 38, 43, 0.06);
}

.calendar-group-chip img,
.calendar-group-chip-fallback {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.calendar-group-chip img {
    object-fit: cover;
}

.calendar-group-chip-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.9rem;
}

#calendar-months {
    display: grid;
    gap: 26px;
}

.calendar-feed {
    display: none;
}

.calendar-month {
    display: grid;
    gap: 14px;
}

.calendar-month + .calendar-month {
    padding-top: 12px;
    border-top: 1px solid rgba(207, 224, 237, 0.72);
}

.calendar-month-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
}

.calendar-month-head h2 {
    margin-bottom: 0;
    letter-spacing: -0.03em;
}

.weekday-row,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.weekday-row {
    margin: 22px 0 14px;
    color: var(--muted);
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.01em;
}

.calendar-cell {
    min-height: 270px;
    padding: 10px;
    border: 1px solid rgba(207, 224, 237, 0.92);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.calendar-cell:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.calendar-cell.is-muted {
    opacity: 0.45;
}

.calendar-cell.is-today {
    border-color: var(--accent);
    box-shadow:
        inset 0 0 0 1px rgba(47, 52, 58, 0.08),
        0 16px 28px rgba(47, 52, 58, 0.1);
}

.calendar-cell-head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.day-full-label {
    display: none;
    margin-right: auto;
    color: var(--ink-soft);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(236, 238, 241, 0.95);
    color: var(--accent-strong);
    font-size: 0.98rem;
    font-weight: 800;
}

.calendar-events {
    display: grid;
    gap: 8px;
}

.calendar-loading {
    margin-top: 8px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(236, 238, 241, 0.8);
    border: 1px solid rgba(207, 224, 237, 0.88);
    color: var(--accent-strong);
    font-weight: 700;
    text-align: center;
}

.calendar-sentinel {
    height: 1px;
}

.feed-day {
    display: grid;
    gap: 12px;
}

.feed-day-head h3 {
    margin-bottom: 0;
    letter-spacing: -0.03em;
}

.feed-list {
    display: grid;
    gap: 12px;
}

.feed-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(207, 224, 237, 0.96);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 20px rgba(34, 38, 43, 0.06);
}

.feed-poster {
    width: 100%;
    aspect-ratio: 210 / 297;
    border-radius: 14px;
    object-fit: cover;
    background: #eff1f3;
}

.feed-poster-placeholder,
.calendar-poster-placeholder,
.event-cover-placeholder,
.calendar-modal-media-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100%;
    padding: 20px;
    background: linear-gradient(180deg, #f7f7f8 0%, #e4e7ea 100%);
    color: var(--accent-strong);
    text-align: center;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.feed-poster-placeholder {
    aspect-ratio: 210 / 297;
    border-radius: 14px;
}

.feed-card.is-preview,
.calendar-event.is-preview {
    border-color: rgba(47, 52, 58, 0.18);
}

.feed-card.is-preview {
    grid-template-columns: minmax(0, 1fr);
}

.feed-card.is-preview .feed-copy small {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.45;
    word-break: keep-all;
}

.feed-copy {
    display: grid;
    align-content: center;
    gap: 6px;
    min-width: 0;
}

.feed-copy strong,
.feed-copy span,
.feed-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-copy strong {
    font-size: 1.02rem;
    letter-spacing: -0.02em;
}

.feed-copy span {
    color: var(--accent-strong);
    font-weight: 800;
}

.feed-copy small {
    color: var(--muted);
    font-size: 0.88rem;
}

.feed-empty {
    padding: 18px;
    border-radius: 18px;
    border: 1px dashed var(--line);
    background: rgba(255, 255, 255, 0.7);
    color: var(--muted);
    text-align: center;
}

.group-table-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.group-logo-thumb,
.group-logo-fallback {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    flex: 0 0 auto;
}

.group-logo-thumb {
    object-fit: cover;
    border: 1px solid rgba(207, 224, 237, 0.88);
}

.group-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 900;
}

.calendar-event {
    display: grid;
    gap: 0;
    padding: 0;
    border-radius: 18px;
    background: var(--surface-strong);
    border: 1px solid rgba(207, 224, 237, 0.96);
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(34, 38, 43, 0.06);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.calendar-event:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: 0 16px 28px rgba(34, 38, 43, 0.1);
}

.calendar-event.has-poster {
    grid-template-columns: 1fr;
}

.calendar-event.no-poster {
    min-height: 78px;
}

.calendar-poster {
    width: 100%;
    aspect-ratio: 210 / 297;
    object-fit: cover;
    background: #eff1f3;
}

.calendar-poster-placeholder {
    aspect-ratio: 210 / 297;
}

.calendar-event-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 14px;
}

.calendar-event.has-poster .calendar-event-copy {
    position: relative;
    margin-top: -92px;
    min-height: 92px;
    color: #fff;
    background: linear-gradient(180deg, transparent 0%, rgba(14, 43, 67, 0.92) 78%);
    align-content: end;
}

.calendar-event.no-poster .calendar-event-copy {
    background: var(--surface-strong);
}

.calendar-event-copy strong,
.calendar-event-copy span,
.calendar-event-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event-copy strong {
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.calendar-event-copy span {
    font-size: 0.9rem;
}

.calendar-event-copy small {
    font-size: 0.8rem;
}

.calendar-event.has-poster .calendar-event-copy span {
    color: rgba(242, 249, 255, 0.84);
}

.calendar-event.has-poster .calendar-event-copy small {
    color: rgba(242, 249, 255, 0.74);
}

.event-shell {
    overflow: hidden;
}

.event-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 28px;
    margin: 22px 0 26px;
}

.event-copy {
    padding: 6px 0;
}

.event-cover img {
    width: 100%;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.event-cover.is-placeholder {
    display: flex;
    align-items: stretch;
}

.event-cover-placeholder {
    min-height: 100%;
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.detail-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    display: grid;
    gap: 8px;
}

.detail-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.72rem;
}

.prose {
    line-height: 1.8;
}

.prose p:last-child {
    margin-bottom: 0;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(540px, 100%);
    padding: 30px;
}

.stack {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--ink-soft);
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid rgba(207, 224, 237, 1);
    border-radius: 16px;
    padding: 13px 14px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    outline: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

input[type="hidden"] {
    display: none !important;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(92, 169, 221, 0.12);
    background: #fff;
}

textarea {
    resize: vertical;
}

.alert {
    margin-bottom: 16px;
    border-radius: 18px;
    padding: 14px 16px;
    border: 1px solid transparent;
}

.alert p:last-child {
    margin-bottom: 0;
}

.alert-success {
    background: rgba(34, 134, 108, 0.08);
    border-color: rgba(34, 134, 108, 0.16);
}

.alert-error {
    background: rgba(182, 55, 55, 0.08);
    border-color: rgba(182, 55, 55, 0.16);
}

.admin-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns 0.22s ease;
}

.admin-shell.is-sidebar-collapsed {
    grid-template-columns: 0 minmax(0, 1fr);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 28px 22px;
    border-right: 1px solid rgba(216, 221, 227, 0.92);
    background: linear-gradient(180deg, rgba(246, 246, 247, 0.98) 0%, rgba(236, 239, 242, 0.94) 100%);
    backdrop-filter: blur(16px);
    overflow: hidden;
    transition:
        transform 0.22s ease,
        opacity 0.18s ease,
        padding 0.22s ease,
        border-color 0.18s ease;
}

.admin-shell.is-sidebar-collapsed .admin-sidebar {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    padding-left: 0;
    padding-right: 0;
    border-color: transparent;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 26px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff;
    font-weight: 900;
    font-size: 1.02rem;
    letter-spacing: -0.02em;
    box-shadow: var(--shadow-sm);
}

.admin-nav {
    display: grid;
    gap: 8px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 16px;
    color: var(--ink-soft);
    font-weight: 700;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.admin-nav a.is-active,
.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    transform: translateX(2px);
}

.admin-main {
    padding: 26px;
}

.admin-topbar {
    margin-bottom: 22px;
}

.admin-topbar-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-user {
    color: var(--muted);
    font-weight: 700;
}

.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        border-color 0.16s ease,
        background 0.16s ease;
}

.sidebar-toggle:hover {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.calendar-shell,
.event-shell,
.auth-card,
.panel,
.stat-card,
.table-wrap,
.calendar-modal-dialog {
    border-color: rgba(216, 221, 227, 0.94);
}

.calendar-top,
.calendar-month + .calendar-month {
    border-color: rgba(216, 221, 227, 0.78);
}

.calendar-top-sticky {
    border-color: rgba(216, 221, 227, 0.96);
    box-shadow: 0 10px 24px rgba(34, 38, 43, 0.06);
}

.calendar-group-chip,
.calendar-cell,
.feed-card,
.calendar-event,
.group-logo-thumb {
    border-color: rgba(216, 221, 227, 0.94);
}

.attachment-preview {
    background: #f2f3f5;
}

.calendar-modal-backdrop {
    background: rgba(29, 31, 35, 0.42);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 22px;
    display: grid;
    gap: 10px;
}

.stat-card span {
    color: var(--muted);
    font-weight: 700;
}

.stat-card strong {
    font-size: 2rem;
    letter-spacing: -0.04em;
}

.panel-head {
    margin-bottom: 8px;
}

.panel h2 {
    margin-bottom: 0;
    letter-spacing: -0.03em;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(207, 224, 237, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 15px 14px;
    border-bottom: 1px solid rgba(207, 224, 237, 0.82);
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.83rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(247, 251, 255, 0.94);
}

tbody tr:hover {
    background: rgba(231, 245, 255, 0.36);
}

.actions,
.actions-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.actions form,
.actions-row form {
    margin: 0;
}

.actions-row {
    flex-wrap: wrap;
    justify-content: flex-start;
    min-width: 220px;
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        border-color 0.16s ease,
        background 0.16s ease;
}

.action-button:hover {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    background: #fff;
    box-shadow: 0 10px 18px rgba(62, 137, 187, 0.12);
}

.action-button-danger {
    border-color: rgba(182, 55, 55, 0.22);
    background: rgba(182, 55, 55, 0.08);
    color: var(--danger);
}

.action-button-danger:hover {
    border-color: rgba(182, 55, 55, 0.34);
    background: rgba(182, 55, 55, 0.12);
    box-shadow: 0 10px 18px rgba(182, 55, 55, 0.12);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 7px 11px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 800;
}

.status-button {
    border: 0;
    cursor: pointer;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease;
}

.status-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(62, 137, 187, 0.14);
}

.status-button.status-published {
    background: var(--success-soft);
    color: var(--success);
}

.status-button.status-draft {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.filter-bar {
    margin: 18px 0;
    flex-wrap: wrap;
}

.filter-bar input {
    flex: 1;
}

.filter-bar select {
    flex: 1 1 260px;
    min-width: 0;
}

.filter-bar .button {
    flex: 0 0 auto;
    min-width: 116px;
    white-space: nowrap;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-span-2 {
    grid-column: span 2;
}

.narrow {
    max-width: 760px;
}

.upload-preview {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
}

.upload-preview img {
    width: min(320px, 100%);
    border-radius: 18px;
    border: 1px solid var(--line);
}

.upload-live-preview {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    background: rgba(244, 250, 255, 0.88);
}

.upload-live-preview img {
    width: min(320px, 100%);
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
}

.group-selection-block {
    display: grid;
    gap: 14px;
}

.group-selection-head {
    display: grid;
    gap: 4px;
}

.group-toggle-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.group-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 10px 16px;
    border-radius: 18px;
    border: 1px solid rgba(207, 224, 237, 0.96);
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        border-color 0.16s ease,
        background 0.16s ease;
}

.group-toggle:hover,
.group-toggle.is-selected {
    transform: translateY(-1px);
    border-color: rgba(92, 169, 221, 0.42);
    background: rgba(231, 245, 255, 0.94);
    box-shadow: 0 12px 18px rgba(58, 102, 136, 0.08);
}

.group-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.group-toggle img,
.group-toggle-fallback {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.group-toggle img {
    object-fit: cover;
}

.group-toggle-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.9rem;
    font-weight: 900;
}

.selection-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.selection-copy small {
    color: var(--muted);
}

.venue-toggle {
    min-width: min(100%, 280px);
}

.selection-empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--muted);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-row input {
    width: auto;
}

.file-help {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.upload-feedback {
    margin: 0;
    color: var(--danger);
    font-size: 0.9rem;
    font-weight: 700;
}

.upload-feedback.is-success {
    color: var(--success);
}

.calendar-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1000;
}

.calendar-modal.is-open {
    display: block;
}

.calendar-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 28, 43, 0.42);
    backdrop-filter: blur(10px);
}

.calendar-modal-dialog {
    position: relative;
    width: min(920px, calc(100% - 24px));
    margin: min(7vh, 56px) auto;
    background: rgba(250, 250, 250, 0.98);
    border: 1px solid rgba(207, 224, 237, 0.95);
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    max-height: calc(100vh - 32px);
}

.calendar-modal-dialog.no-media {
    grid-template-columns: minmax(0, 1fr);
    max-width: 580px;
}

.calendar-modal-media {
    background: linear-gradient(180deg, #eeeeef 0%, #dfe3e8 100%);
    min-height: 100%;
    display: grid;
    place-items: stretch;
}

.calendar-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.calendar-modal-media img[hidden] {
    display: none;
}

.calendar-modal-media.is-empty {
    display: none;
}

.calendar-modal-media.is-placeholder {
    place-items: center;
}

.calendar-modal-media-placeholder {
    min-height: 100%;
    border-radius: 0;
}

.calendar-modal-body {
    padding: 30px;
    display: grid;
    gap: 14px;
    overflow-y: auto;
}

.calendar-modal-body h2 {
    margin-bottom: 0;
    letter-spacing: -0.04em;
}

.calendar-modal-schedule,
.calendar-modal-venue {
    color: var(--accent-strong);
    font-weight: 800;
}

.calendar-modal-summary {
    color: var(--muted);
    line-height: 1.75;
    white-space: pre-line;
}

.calendar-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    border: 0;
    border-radius: 999px;
    background: rgba(20, 50, 75, 0.08);
    color: var(--ink);
    padding: 10px 14px;
    cursor: pointer;
}

.calendar-modal-close:hover {
    background: rgba(20, 50, 75, 0.12);
}

@media (max-width: 980px) {
    .admin-shell,
    .event-hero,
    .detail-grid,
    .stats-grid,
    .calendar-modal-dialog {
        grid-template-columns: 1fr;
    }

    .admin-shell.is-sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(216, 221, 227, 0.92);
    }

    .admin-shell.is-sidebar-collapsed .admin-sidebar {
        display: none;
    }

    .weekday-row {
        display: none;
    }

    .calendar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calendar-cell {
        min-height: 240px;
        padding: 12px;
    }

    .calendar-modal-dialog {
        margin-top: 24px;
        width: min(100%, calc(100% - 18px));
        border-radius: 24px;
        max-height: calc(100vh - 18px);
    }

    .calendar-modal-media {
        max-height: 360px;
    }
}

@media (max-width: 720px) {
    .calendar-shell,
    .event-shell,
    .auth-shell {
        width: min(100%, calc(100% - 20px));
        margin: 16px auto;
    }

    .calendar-shell,
    .event-shell,
    .panel,
    .auth-card {
        padding: 20px;
        border-radius: 24px;
    }

    .calendar-top,
    .panel-head,
    .admin-topbar,
    .filter-bar,
    .form-actions,
    .topbar-actions,
    .actions,
    .calendar-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-top {
        gap: 14px;
        align-items: stretch;
    }

    .calendar-month-head {
        align-items: start;
    }

    .calendar-month-head h2 {
        font-size: 1.35rem;
    }

    .calendar-month-nav {
        margin-bottom: 18px;
    }

    .calendar-month-nav-center {
        gap: 10px;
    }

    .calendar-month-nav-label {
        font-size: 1.6rem;
    }

    .calendar-group-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .calendar-group-chip {
        flex: 0 0 auto;
    }

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

    .calendar-cell {
        min-height: 212px;
        padding: 8px;
        border-radius: 18px;
    }

    .calendar-cell-head {
        margin-bottom: 8px;
        justify-content: space-between;
    }

    .day-number {
        min-width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .day-full-label {
        display: inline-block;
    }

    .calendar-event {
        border-radius: 14px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field-span-2 {
        grid-column: auto;
    }

    .calendar-event.has-poster .calendar-event-copy {
        margin-top: -74px;
        min-height: 74px;
        padding: 10px;
    }

    .calendar-modal-body {
        padding: 22px 22px 30px;
    }

    .calendar-modal-schedule,
    .calendar-modal-venue,
    .calendar-modal-summary {
        font-size: 0.95rem;
    }

    .selection-empty {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 560px) {
    .calendar-shell,
    .event-shell,
    .auth-shell {
        width: min(100%, calc(100% - 14px));
    }

    .calendar-shell,
    .event-shell,
    .panel,
    .auth-card {
        padding: 16px;
    }

    .calendar-top-sticky {
        top: 6px;
        padding: 12px;
        border-radius: 18px;
    }

    .calendar-filter-bar {
        justify-content: flex-start;
        margin-bottom: 14px;
    }

    .calendar-month-nav {
        justify-content: flex-start;
        margin-bottom: 16px;
    }

    .calendar-month-nav-center {
        gap: 8px;
        width: 100%;
    }

    .calendar-month-nav-label {
        flex: 1 1 auto;
        font-size: 1.35rem;
        text-align: center;
    }

    .month-nav-arrow,
    .month-nav-today {
        min-height: 38px;
        padding: 0 12px;
    }

    .calendar-current-label {
        font-size: 1.08rem;
    }

    .calendar-group-chip {
        min-height: 42px;
        padding: 0 14px;
        font-size: 0.9rem;
    }

    .weekday-row,
    .calendar-grid {
        display: none;
    }

    .calendar-feed {
        display: grid;
        gap: 20px;
    }

    .calendar-cell {
        min-height: auto;
        padding: 10px;
    }

    .day-full-label {
        font-size: 0.88rem;
    }

    .calendar-event.has-poster .calendar-event-copy {
        margin-top: -82px;
        min-height: 82px;
    }

    .calendar-modal-dialog {
        width: calc(100% - 10px);
        margin-top: 8px;
        border-radius: 20px;
        max-height: calc(100vh - 10px);
    }

    .calendar-modal-body {
        padding: 18px 18px 34px;
        gap: 12px;
    }

    .calendar-modal-actions {
        padding-bottom: 8px;
    }

    .feed-card {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 12px;
        padding: 8px;
        border-radius: 16px;
    }

    .feed-poster {
        border-radius: 12px;
    }

    .group-toggle-grid {
        gap: 10px;
    }

    .group-toggle {
        width: 100%;
        justify-content: flex-start;
    }
}
