:root {
    color-scheme: light;
    --bg: #f7f8fb;
    --surface: #ffffff;
    --surface-2: #eef3f6;
    --text: #1c2430;
    --muted: #647083;
    --line: #dce3ea;
    --accent: #0f766e;
    --accent-2: #b4235a;
    --warning: #a15c07;
    --shadow: 0 12px 34px rgba(28, 36, 48, 0.08);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111418;
    --surface: #1a1f25;
    --surface-2: #242b33;
    --text: #eef2f5;
    --muted: #a8b3bf;
    --line: #303943;
    --accent: #2dd4bf;
    --accent-2: #fb7185;
    --warning: #fbbf24;
    --shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    transition: background-color 160ms ease, color 160ms ease;
}

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

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

h1 {
    max-width: 820px;
    margin-bottom: 10px;
    font-size: 34px;
    line-height: 1.12;
    font-weight: 760;
}

h2 {
    margin-bottom: 0;
    font-size: 20px;
    line-height: 1.25;
}

h1:focus {
    outline: none;
}

.app-shell {
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 72px;
    padding: 12px clamp(16px, 4vw, 40px);
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    width: min(220px, 36vw);
}

.brand-logo {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    max-height: 46px;
    object-fit: contain;
    object-position: left center;
}

.brand-logo-dark {
    display: none;
}

[data-theme="dark"] .brand-logo-light {
    display: none;
}

[data-theme="dark"] .brand-logo-dark {
    display: block;
}

.topnav {
    display: flex;
    justify-content: center;
    min-width: 0;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.topnav::-webkit-scrollbar {
    display: none;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 7px;
    min-width: 46px;
    min-height: 42px;
    justify-content: center;
    padding: 10px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
}

.nav-link .e-icons {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    font-size: 22px;
    line-height: 1;
}

.memoria-icon {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    color: currentColor;
    font-family: inherit;
}

.memoria-icon::before,
.memoria-icon::after {
    position: absolute;
    box-sizing: border-box;
    content: "";
}

.memoria-icon-bell::before {
    left: 3px;
    top: 2px;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-bottom-width: 3px;
    border-radius: 11px 11px 6px 6px;
}

.memoria-icon-bell::after {
    left: 8px;
    bottom: 1px;
    width: 6px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
}

.memoria-icon-dashboard::before {
    inset: 2px;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.memoria-icon-dashboard::after {
    inset: 6px;
    background:
        linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat,
        linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}

.memoria-icon-monitor::before {
    left: 1px;
    top: 3px;
    width: 22px;
    height: 15px;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.memoria-icon-monitor::after {
    left: 6px;
    bottom: 1px;
    width: 10px;
    height: 5px;
    border-bottom: 2px solid currentColor;
    background: linear-gradient(currentColor, currentColor) center top / 2px 5px no-repeat;
}

.nav-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.nav-badge {
    position: absolute;
    top: 6px;
    left: calc(50% + 6px);
    z-index: 1;
    display: inline-grid;
    min-width: 16px;
    height: 16px;
    place-items: center;
    padding: 0 4px;
    border: 2px solid var(--surface);
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    transform: translate(-15%, -25%);
}

.nav-link:hover,
.nav-link:focus {
    background: var(--surface-2);
    color: var(--text);
}

.admin-link {
    color: var(--accent-2);
}

.top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.top-actions form {
    margin: 0;
}

.theme-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 54px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.theme-button:hover,
.theme-button:focus {
    background: var(--surface-2);
}

.user-chip {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 240px;
    gap: 9px;
    padding: 5px 9px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}

.user-notification-link {
    min-width: 40px;
    min-height: 40px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}

.user-notification-link .nav-badge {
    top: 4px;
    left: calc(50% + 7px);
}

.user-avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-fallback {
    display: grid;
    place-items: center;
    background-color: #26323b;
    color: #fff;
    font-size: 12px;
    font-weight: 850;
}

.user-name {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-button {
    min-width: 42px;
    min-height: 38px;
    padding-inline: 10px;
    border-color: color-mix(in srgb, var(--danger) 58%, var(--line));
    background: color-mix(in srgb, var(--danger) 12%, var(--surface));
    color: var(--danger);
    white-space: nowrap;
}

.logout-button:hover,
.logout-button:focus {
    border-color: var(--danger);
    background: color-mix(in srgb, var(--danger) 22%, var(--surface));
    color: var(--danger);
}

.logout-button .e-icons {
    font-size: 18px;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.icon-link .e-icons,
.icon-inline .e-icons {
    flex: 0 0 auto;
    font-size: 14px;
}

.icon-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.main-surface {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: clamp(18px, 4vw, 38px);
}

.page-stack {
    display: grid;
    gap: 20px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.compact-heading {
    align-items: center;
}

.heading-actions,
.form-actions,
.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.muted {
    color: var(--muted);
    line-height: 1.55;
}

.small-copy {
    margin-top: 16px;
    margin-bottom: 0;
    font-size: 13px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.admin-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-metric-card {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: inherit;
    text-decoration: none;
}

.admin-metric-card > .e-icons {
    display: inline-grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--accent);
    font-size: 22px;
}

.admin-metric-card div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.admin-metric-card strong {
    color: var(--text);
    font-size: 28px;
    line-height: 1;
}

.admin-metric-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.admin-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.admin-shortcut-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: inherit;
    text-decoration: none;
}

.admin-shortcut-card > .e-icons:first-child {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--accent-2);
    font-size: 22px;
}

.admin-shortcut-card > .e-icons:last-child {
    color: var(--muted);
}

.admin-shortcut-card div {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.admin-shortcut-card strong {
    color: var(--text);
    font-size: 15px;
}

.admin-shortcut-card small {
    color: var(--muted);
    font-size: 12px;
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.admin-work-list,
.notification-list {
    display: grid;
    gap: 10px;
}

.admin-work-row,
.notification-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    color: inherit;
    text-decoration: none;
}

.admin-work-row > .e-icons,
.notification-row > .e-icons {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 999px;
    background: var(--surface);
    color: var(--accent);
    font-size: 18px;
}

.admin-work-row div,
.notification-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-work-row strong,
.notification-copy strong {
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-work-row small,
.admin-work-row > span,
.notification-copy p,
.notification-copy time {
    color: var(--muted);
    font-size: 12px;
}

.admin-work-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.admin-work-row-actions > span {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.notification-row.unread {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
    background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.notification-copy > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.notification-copy p {
    margin: 0;
}

.notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.event-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.event-card-link {
    min-width: 0;
}

.metric-card.e-card,
.event-card.e-card,
.media-card.e-card,
.task-card.e-card,
.form-card.e-card,
.list-card.e-card,
.empty-card.e-card,
.auth-card.e-card {
    border-color: var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-card.e-card:hover,
.form-card.e-card:focus,
.form-card.e-card:focus-within,
.e-card.form-card:hover,
.e-card.form-card:focus,
.e-card.form-card:focus-within {
    border-color: var(--line) !important;
    background: var(--surface) !important;
    box-shadow: var(--shadow) !important;
    transform: none !important;
}

.form-card.e-card:hover .e-card-header,
.form-card.e-card:hover .e-card-content,
.e-card.form-card:hover .e-card-header,
.e-card.form-card:hover .e-card-content {
    background: transparent !important;
    color: var(--text) !important;
}

.event-card.e-card {
    height: 100%;
}

.event-description {
    min-height: 46px;
}

.event-cover-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 18px;
    align-items: stretch;
}

.event-cover-card-link {
    display: block;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.event-cover-card {
    position: relative;
    display: flex;
    min-height: 430px;
    height: 100%;
    overflow: hidden;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.74)),
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 70%, #0b1220), #171b23 58%, color-mix(in srgb, var(--accent-2) 42%, #111418));
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
    color: #fff;
}

.event-cover-card-link:focus-visible .event-cover-card {
    outline: 3px solid color-mix(in srgb, var(--accent) 72%, transparent);
    outline-offset: 3px;
}

.event-cover-card-top {
    display: flex;
    justify-content: flex-start;
}

.event-cover-card-copy {
    display: grid;
    gap: 8px;
    margin-top: auto;
    padding-bottom: 18px;
}

.event-cover-card-copy > span {
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .08em;
}

.event-cover-card-copy > strong {
    overflow-wrap: anywhere;
    font-size: 30px;
    line-height: 1.05;
}

.event-cover-card-copy small {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 750;
}

.event-cover-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 -20px -18px;
    padding: 14px 20px;
    background: color-mix(in srgb, #05070a 54%, transparent);
    border-top: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(10px);
}

.event-cover-owner {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.event-cover-owner-avatar {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #05070a;
    color: #fff;
    font-size: 12px;
    font-weight: 850;
}

.event-cover-owner div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.event-cover-owner strong,
.event-cover-owner span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-cover-owner span,
.event-cover-status {
    font-size: 11px;
    font-weight: 750;
    color: rgba(255,255,255,.76);
}

.event-cover-status {
    display: grid;
    flex: 0 0 auto;
    gap: 3px;
    text-align: right;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.metric-card .e-card-content {
    display: grid;
    gap: 6px;
}

.metric-card strong {
    font-size: 26px;
}

.metric-card span {
    color: var(--muted);
    font-size: 13px;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

.feed-only-grid {
    display: grid;
    width: min(820px, 100%);
    gap: 18px;
}

.event-invitation-builder {
    display: grid;
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.invitation-preview-panel {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 12px;
}

.invitation-card-preview {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.invitation-cover {
    position: relative;
    display: flex;
    min-height: 460px;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 20px 22px;
    background:
        linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.74)),
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 72%, #0b1220), #141922 58%, color-mix(in srgb, var(--accent-2) 46%, #111418));
    background-position: center;
    background-size: cover;
    color: #fff;
}

.invitation-access-pill {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    color: #1c2430;
    font-size: 12px;
    font-weight: 750;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent-2);
}

.invitation-cover-copy {
    display: grid;
    gap: 8px;
}

.invitation-cover-copy span {
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .08em;
}

.invitation-cover-copy strong {
    overflow-wrap: anywhere;
    font-size: 34px;
    line-height: 1.05;
}

.invitation-cover-copy small {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 700;
}

.invitation-footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
}

.invitation-owner-avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
}

.invitation-footer div {
    display: grid;
    gap: 2px;
}

.invitation-footer span {
    color: var(--muted);
    font-size: 12px;
}

.invitation-state {
    text-transform: uppercase;
    letter-spacing: .16em;
    font-weight: 850;
}

.invitation-form-card.e-card {
    width: 100%;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.no-top-margin {
    margin-top: 0;
}

.cover-picker {
    display: grid;
    gap: 10px;
}

.cover-picker-preview {
    display: flex;
    min-height: 260px;
    align-items: flex-end;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.68)),
        var(--surface-2);
    background-position: center;
    background-size: cover;
    color: #fff;
}

.cover-picker-preview span {
    min-width: 0;
    margin-right: auto;
    overflow: hidden;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.light-button.e-btn {
    border-color: rgba(255,255,255,.42) !important;
    background: rgba(255,255,255,.88) !important;
    color: #111418 !important;
}

.visually-hidden-uploader {
    display: none;
}

.event-public-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.event-public-toggle > span {
    display: grid;
    gap: 5px;
}

.event-public-toggle small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.event-detail-invitation {
    display: flex;
    min-height: min(76vh, 720px);
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 20px 22px;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.74)),
        var(--surface-2);
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
    color: #fff;
}

.stretched-actions {
    align-items: stretch;
}

.wide-submit.e-btn {
    min-height: 44px;
    flex: 1 1 280px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
}

.feed-panel,
.detail-main,
.side-panel {
    display: grid;
    gap: 14px;
}

.detail-list {
    display: grid;
    gap: 11px;
}

.detail-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.detail-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.detail-list span,
.member-row span,
.invitation-row span {
    color: var(--muted);
    font-size: 13px;
}

.member-list,
.invitation-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.member-row,
.invitation-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.side-panel .member-row {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.side-panel .member-row .e-btn {
    justify-self: end;
}

.participant-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.participant-card-header h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
}

.participant-state-icon {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
}

.participant-state-icon.accepted {
    color: #2dd4bf;
    border-color: rgba(45, 212, 191, .45);
    background: rgba(45, 212, 191, .1);
}

.participant-state-icon.pending {
    color: #facc15;
    border-color: rgba(250, 204, 21, .45);
    background: rgba(250, 204, 21, .1);
}

.icon-only-button.e-btn {
    min-width: 32px;
    width: 32px;
    height: 32px;
    padding: 0;
}

.member-row div,
.invitation-row div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.member-row strong,
.invitation-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px auto;
    gap: 12px;
    align-items: start;
}

.inline-form .form-field {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.inline-form-action {
    padding-top: 25px;
}

.invite-dialog .e-dlg-content {
    background: var(--surface);
}

.dialog-form {
    display: grid;
    gap: 14px;
}

.qr-box {
    display: grid;
    place-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.invite-link-text {
    overflow-wrap: anywhere;
    font-size: 12px;
}

.narrow-form {
    width: min(720px, 100%);
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.feed-update-banner {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent) 14%, var(--surface));
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.feed-update-banner:hover,
.feed-update-banner:focus {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 20%, var(--surface));
}

.media-placeholder {
    display: grid;
    min-height: 220px;
    gap: 10px;
    place-items: center;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--accent) 12%, var(--surface)),
            color-mix(in srgb, var(--accent-2) 10%, var(--surface)));
    color: var(--accent);
    font-weight: 800;
}

.media-preview {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    object-fit: cover;
}

.media-preview-trigger {
    cursor: pointer;
    border-radius: 8px;
    outline: none;
}

.media-preview-trigger:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 34%, transparent);
}

.media-detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr);
    gap: 16px;
}

.media-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.media-detail-header > strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.media-detail-uploader {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    text-align: right;
}

.media-detail-uploader > div {
    display: grid;
    gap: 2px;
}

.media-detail-uploader time {
    color: var(--muted);
    font-size: 12px;
}

.media-detail-preview {
    display: grid;
    min-height: 360px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    overflow: hidden;
}

.media-detail-object {
    display: block;
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
}

.media-detail-placeholder {
    width: 100%;
    min-height: 360px;
}

.media-detail-info {
    display: grid;
    align-content: start;
    gap: 8px;
    grid-template-rows: auto auto auto auto;
    min-height: 360px;
}

.media-detail-info h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
}

.post-caption {
    margin: 0 0 12px;
    color: var(--text);
    font-weight: 650;
}

.shared-media-header,
.post-author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.shared-media-author {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.shared-media-author-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.post-author-copy {
    min-width: 0;
}

.post-author-row > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.shared-media-header strong,
.post-author-row strong {
    color: var(--text);
    font-size: 14px;
}

.shared-media-header span,
.post-author-row span {
    color: var(--muted);
    font-size: 12px;
}

.shared-media-time,
.post-author-time {
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
}

.shared-media-avatar,
.post-author-avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
}

.post-media-grid {
    display: grid;
    gap: 8px;
}

.post-media-grid.single {
    grid-template-columns: 1fr;
}

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

.post-media-tile {
    min-width: 0;
}

.post-carousel {
    width: 100%;
    max-height: 420px;
    overflow: hidden;
}

.post-carousel .e-carousel-items,
.post-carousel .e-carousel-item {
    height: 100%;
    max-height: 420px;
}

.post-carousel .media-preview,
.post-carousel .media-placeholder {
    height: 420px;
    min-height: 0;
    aspect-ratio: auto;
}

.post-carousel .media-preview {
    object-fit: contain;
}

.post-card > .e-card-content > .media-preview,
.post-card > .e-card-content > .media-placeholder {
    max-height: 520px;
}

.post-card > .e-card-content > .media-preview {
    object-fit: contain;
}

.post-carousel .e-carousel-navigators .e-previous,
.post-carousel .e-carousel-navigators .e-next {
    background: color-mix(in srgb, #000 58%, transparent);
    border: 1px solid color-mix(in srgb, #fff 28%, transparent);
    color: #fff;
}

.post-media-grid.multi .media-preview,
.post-media-grid.multi .media-placeholder {
    aspect-ratio: 1 / 1;
    min-height: 0;
}

.selected-media-list {
    display: grid;
    gap: 2px;
    margin-top: 8px;
}

.selected-media-list > strong {
    color: var(--text);
    font-size: 13px;
}

.upload-progress-panel {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.upload-progress-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.upload-progress-copy strong {
    color: var(--text);
    font-size: 13px;
}

.upload-progress-copy span {
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.upload-progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line) 70%, transparent);
}

.upload-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width .18s ease;
}

.preview-link {
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.small-preview-link {
    font-size: 11px;
}

.media-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.media-actions,
.comment-form,
.upload-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    align-items: center;
}

.media-uploader-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 14px;
    align-items: start;
}

.media-uploader {
    min-width: 0;
}

.media-uploader .e-upload {
    border-color: var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.media-uploader .e-upload-drag-hover {
    border-color: var(--accent);
}

.media-uploader .e-upload-actions {
    display: none;
}

.media-uploader .e-file-status {
    display: none;
}

.post-social-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.post-social-summary-row {
    column-gap: 16px;
    row-gap: 6px;
}

.post-social-summary-row p {
    margin: 0;
}

.comment-list {
    display: grid;
    gap: 6px;
    margin-top: 12px;
}

.comment-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.comment-row.own-comment {
    justify-content: flex-end;
}

.comment-row.other-comment {
    justify-content: flex-start;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
}

.own-comment .comment-avatar {
    order: 2;
}

.comment-bubble {
    display: grid;
    max-width: min(72%, 560px);
    gap: 3px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.own-comment .comment-bubble {
    background: color-mix(in srgb, var(--accent) 17%, var(--surface));
    border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}

.comment-meta strong {
    font-size: 13px;
}

.comment-meta time {
    color: var(--muted);
    font-size: 11px;
}

.comment-bubble > span {
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.comment-content {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
}

.comment-content > span {
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.comment-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.comment-inline-tools {
    flex: 0 0 auto;
    margin-top: 0;
}

.comment-tools .e-btn.e-small {
    min-height: 28px;
    padding: 3px 8px;
}

.comment-icon-button.e-btn.e-small {
    min-width: 28px;
    width: 28px;
    padding: 0;
}

.comment-edit-box {
    min-width: min(320px, 100%);
}

.danger-action {
    color: var(--danger) !important;
}

.comment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.event-media-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.legacy-media-list {
    display: none;
}

.event-media-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-top: 16px;
    align-items: stretch;
}

.pending-media-panel {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.pending-media-header,
.pending-media-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pending-media-header > div,
.pending-media-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.pending-media-header strong,
.pending-media-copy strong {
    color: var(--text);
}

.pending-media-header span,
.pending-media-copy span {
    color: var(--muted);
    font-size: 12px;
}

.pending-media-list {
    display: grid;
    gap: 8px;
}

.pending-media-row {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.pending-media-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
}

.pending-media-copy {
    flex: 1 1 auto;
}

.pending-media-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.event-media-carousel-wrap,
.event-media-info-panel {
    min-width: 0;
}

.event-media-carousel-wrap {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.event-media-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.inline-owner {
    justify-content: flex-start;
    text-align: left;
}

.event-media-carousel {
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: var(--surface-2);
}

.event-media-carousel .e-carousel-items,
.event-media-carousel .e-carousel-item {
    height: 100%;
}

.event-media-preview,
.event-media-placeholder {
    display: grid;
    width: 100%;
    height: 520px;
    place-items: center;
    background: var(--surface-2);
}

.event-media-preview {
    object-fit: contain;
}

.event-media-placeholder {
    gap: 10px;
    color: var(--accent);
    font-weight: 850;
}

.event-media-info-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.event-media-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.event-media-panel-header > strong {
    min-width: 0;
    color: var(--text);
    font-size: 16px;
    overflow-wrap: anywhere;
}

.media-status-icon {
    display: inline-grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--accent);
    font-size: 16px;
}

.media-status-icon.pending,
.media-status-icon.archived {
    color: var(--muted);
}

.media-status-icon.rejected {
    color: var(--danger);
}

.event-media-owner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    text-align: right;
}

.event-media-owner-text {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.event-media-owner-text strong {
    color: var(--text);
    overflow-wrap: anywhere;
}

.event-media-owner-text time {
    color: var(--muted);
    font-size: 12px;
}

.compact-detail-list {
    gap: 8px;
}

.info-actions {
    justify-content: flex-start;
}

.event-media-comments {
    max-height: min(42vh, 390px);
    gap: 6px;
    align-content: start;
    overflow: auto;
    padding-right: 2px;
}

.media-detail-comments {
    max-height: min(46vh, 430px);
    gap: 6px;
    align-content: start;
    overflow: auto;
    padding-right: 2px;
}

.media-post-actionbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 6px;
}

.media-action-host {
    position: relative;
    min-width: 0;
}

.media-comments-offcanvas {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 20;
    display: grid;
    width: min(420px, 100%);
    max-height: min(560px, 72vh);
    grid-template-rows: auto minmax(0, 1fr);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .28);
    overflow: hidden;
}

.media-comments-offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
}

.media-comments-offcanvas-header > div {
    display: grid;
    gap: 2px;
}

.media-comments-offcanvas-header strong {
    color: var(--text);
    font-size: 16px;
}

.media-comments-offcanvas-header span {
    color: var(--muted);
    font-size: 12px;
}

.media-comments-offcanvas-body {
    display: grid;
    min-height: 0;
    align-content: start;
    gap: 12px;
    padding: 14px;
    overflow: auto;
}

.drawer-comment-list {
    margin-top: 0;
}

.drawer-comment-form {
    position: sticky;
    bottom: 0;
    padding-top: 8px;
    background: var(--surface);
}

.feed-post-actionbar {
    padding: 10px 0 8px;
}

.media-action-pair {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.media-icon-button {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
}

.media-icon-button:hover,
.media-icon-button:focus {
    background: var(--surface-2);
}

.media-icon-button.liked,
.media-icon-button.active,
.media-icon-button.danger-action {
    color: var(--danger);
}

.media-icon-button.active {
    background: var(--surface-2);
}

.media-icon-button.approve-action {
    color: var(--accent);
}

.feed-event-icon-link {
    margin-left: 4px;
}

.media-action-count {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.media-action-pair:nth-of-type(2) {
    margin-right: auto;
}

.media-like-summary {
    margin: 0;
    padding: 0 14px 14px;
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
}

.memoria-icon-heart {
    width: 24px;
    height: 24px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19.5 12.6 12 20l-7.5-7.4A5 5 0 0 1 12 6a5 5 0 0 1 7.5 6.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19.5 12.6 12 20l-7.5-7.4A5 5 0 0 1 12 6a5 5 0 0 1 7.5 6.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.memoria-icon-heart::before,
.memoria-icon-heart::after {
    content: none;
}

.media-icon-button.liked .memoria-icon-heart::before,
.media-icon-button.liked .memoria-icon-heart::after {
    content: none;
}

.media-icon-button.liked .memoria-icon-heart {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M19.5 12.6 12 20l-7.5-7.4A5 5 0 0 1 12 6a5 5 0 0 1 7.5 6.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M19.5 12.6 12 20l-7.5-7.4A5 5 0 0 1 12 6a5 5 0 0 1 7.5 6.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.memoria-icon-comment {
    width: 24px;
    height: 24px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.4 8.4 0 0 1-3.8-.9L3 21l1.9-5.7a8.4 8.4 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6A8.4 8.4 0 0 1 12.5 3h.5a8 8 0 0 1 8 8v.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.4 8.4 0 0 1-3.8-.9L3 21l1.9-5.7a8.4 8.4 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6A8.4 8.4 0 0 1 12.5 3h.5a8 8 0 0 1 8 8v.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.memoria-icon-comment::before {
    content: none;
}

.memoria-icon-comment::after {
    content: none;
}

.media-detail-tabs {
    min-width: 0;
}

.media-detail-tabs .e-tab-header {
    border-bottom: 1px solid var(--line);
}

.media-detail-tabs .e-content {
    padding-top: 12px;
}

.event-media-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.media-thumb {
    display: grid;
    width: 70px;
    height: 70px;
    gap: 4px;
    place-items: center;
    border-radius: 8px;
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--accent) 16%, var(--surface)),
            color-mix(in srgb, var(--accent-2) 14%, var(--surface)));
    color: var(--accent);
    font-size: 12px;
    font-weight: 850;
}

.media-thumb-preview {
    display: block;
    width: 70px;
    height: 70px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    object-fit: cover;
}

.event-media-body {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.event-media-body strong,
.event-media-body span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-media-body span {
    color: var(--muted);
    font-size: 13px;
}

.event-media-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.task-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.admin-grid {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.admin-split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.package-list {
    display: grid;
    gap: 10px;
}

.package-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 110px 100px 84px auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.package-row strong,
.package-row span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.package-row > div span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.admin-search {
    grid-template-columns: minmax(0, 1fr) 160px auto;
}

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

.admin-user-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr) minmax(170px, 0.7fr) auto;
    gap: 12px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.admin-user-row > div:first-child,
.admin-user-row .form-field,
.role-permission-row {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.admin-user-row span,
.admin-user-row .form-field span {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.role-permission-row {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.role-permission-row:last-child {
    border-bottom: 0;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

.friends-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.friends-search {
    grid-template-columns: minmax(0, 1fr) auto;
}

.compact-member-row {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
}

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

.profile-photo-panel {
    display: grid;
    gap: 14px;
}

.theme-preference-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.account-action-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.theme-preference-panel > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.account-action-panel > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.theme-preference-panel strong {
    color: var(--text);
}

.account-action-panel strong {
    color: var(--text);
}

.theme-preference-panel span,
.account-action-panel span {
    color: var(--muted);
    font-size: 13px;
}

.profile-theme-button {
    flex: 0 0 auto;
}

.account-action-panel form {
    margin: 0;
}

.profile-logout-button {
    flex: 0 0 auto;
}

.profile-photo-preview {
    display: grid;
    width: 112px;
    height: 112px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--accent);
    object-fit: cover;
    font-size: 32px;
    font-weight: 850;
}

.photo-upload-actions {
    display: grid;
    gap: 10px;
}

.profile-photo-uploader {
    min-width: 0;
}

.profile-photo-uploader .e-upload {
    border-color: var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.profile-photo-uploader .e-upload-actions,
.profile-photo-uploader .e-file-status {
    display: none;
}

.profile-status-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.profile-status-list div:last-child {
    border-bottom: 0;
}

.profile-status-list span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.profile-status-list strong {
    font-size: 13px;
}

.form-grid {
    display: grid;
    gap: 14px;
}

.form-grid .form-field,
.form-field {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.e-card {
    background: var(--surface);
    color: var(--text);
}

.e-card .e-card-header-title,
.e-card .e-card-header-caption,
.e-card .e-card-content {
    color: var(--text);
}

.e-input-group,
.e-input-group.e-control-wrapper,
.e-float-input,
.e-float-input.e-control-wrapper,
.e-ddl.e-input-group,
.e-ddl.e-input-group.e-control-wrapper,
.e-numeric.e-input-group,
.e-numeric.e-control-wrapper {
    border-color: var(--line);
    background: var(--surface);
    color: var(--text);
}

.form-field:hover {
    color: var(--muted);
}

.form-field .e-input-group:not(.e-focused):hover,
.form-field .e-input-group.e-control-wrapper:not(.e-focused):hover,
.form-field .e-float-input:not(.e-focused):hover,
.form-field .e-float-input.e-control-wrapper:not(.e-focused):hover,
.form-field .e-ddl.e-input-group:not(.e-focused):hover,
.form-field .e-ddl.e-input-group.e-control-wrapper:not(.e-focused):hover,
.form-field .e-numeric.e-input-group:not(.e-focused):hover,
.form-field .e-numeric.e-control-wrapper:not(.e-focused):hover {
    border-color: var(--line) !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    box-shadow: none !important;
}

.form-field .e-input-group:not(.e-focused):hover input.e-input,
.form-field .e-input-group:not(.e-focused):hover textarea.e-input,
.form-field .e-input-group.e-control-wrapper:not(.e-focused):hover input.e-input,
.form-field .e-input-group.e-control-wrapper:not(.e-focused):hover textarea.e-input {
    background: transparent !important;
    color: var(--text) !important;
}

.e-input-group input.e-input,
.e-input-group textarea.e-input,
.e-input,
.e-dropdownbase,
.e-control,
.e-checkbox-wrapper .e-label {
    color: var(--text);
}

.e-input-group input.e-input::placeholder,
.e-input-group textarea.e-input::placeholder {
    color: var(--muted);
}

.e-input-group.e-control-wrapper.e-focused,
.e-input-group.e-focused,
.e-ddl.e-input-group.e-focused,
.e-ddl.e-input-group.e-control-wrapper.e-focused {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
}

.e-popup,
.e-popup.e-ddl,
.e-dropdownbase .e-list-parent,
.e-dropdownbase .e-list-item {
    background: var(--surface);
    color: var(--text);
    border-color: var(--line);
}

.e-dropdownbase .e-list-item.e-hover,
.e-dropdownbase .e-list-item:hover,
.e-dropdownbase .e-list-item.e-active {
    background: var(--surface-2);
    color: var(--text);
}

.e-ddl.e-popup,
.e-popup-open {
    z-index: 10010;
}

.form-actions {
    margin-top: 16px;
}

.auth-page {
    display: grid;
    min-height: calc(100vh - 148px);
    place-items: center;
}

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

.auth-actions {
    display: grid;
}

.auth-button {
    width: 100%;
    min-height: 42px;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    padding: 1rem;
    color: white;
    background: #b32121;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

#blazor-error-ui {
    display: none;
}

@media (max-width: 900px) {
    .topbar {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand actions"
            "nav nav";
        gap: 10px;
    }

    .brand {
        grid-area: brand;
    }

    .top-actions {
        grid-area: actions;
    }

    .user-chip {
        max-width: 190px;
    }

    .topnav {
        grid-area: nav;
        justify-content: flex-start;
        margin: 0 -4px;
        padding-bottom: 2px;
    }

    .page-heading,
    .content-grid,
    .detail-grid,
    .admin-grid,
    .admin-split-grid,
    .admin-dashboard-grid,
    .admin-shortcut-grid,
    .profile-grid,
    .friends-grid,
    .event-invitation-builder {
        grid-template-columns: 1fr;
    }

    .invitation-preview-panel {
        position: static;
    }

    .invitation-cover {
        min-height: 380px;
    }

    .event-card-grid {
        grid-template-columns: 1fr;
    }

    .event-cover-grid {
        grid-template-columns: 1fr;
    }

    .event-cover-card {
        min-height: 380px;
    }

    .event-cover-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .event-cover-status {
        text-align: left;
    }

    .inline-form,
    .event-media-row,
    .event-media-showcase,
    .media-detail-content,
    .media-uploader-panel,
    .member-row,
    .friends-search,
    .admin-search,
    .admin-user-row,
    .package-row {
        grid-template-columns: 1fr;
    }

    .admin-row-actions {
        justify-content: flex-start;
    }

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

    .event-media-preview,
    .event-media-placeholder {
        height: min(430px, 62vh);
    }

    .event-media-info-panel,
    .media-detail-info {
        min-height: auto;
    }

    .pending-media-header,
    .pending-media-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .pending-media-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .inline-form-action {
        padding-top: 0;
    }

    .page-heading {
        display: grid;
        align-items: start;
    }

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

    h1 {
        font-size: 28px;
    }
}

@media (max-width: 520px) {
    .brand {
        width: min(170px, 44vw);
    }

    .main-surface {
        padding: 16px;
    }

    .top-actions {
        gap: 7px;
    }

    .theme-button {
        min-width: 48px;
        padding: 0 8px;
    }

    .user-chip {
        max-width: 46px;
        padding-right: 5px;
    }

    .user-name {
        display: none;
    }

    .theme-preference-panel,
    .account-action-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .upload-progress-copy,
    .notification-copy > div {
        align-items: flex-start;
        flex-direction: column;
    }

    .upload-progress-copy span {
        text-align: left;
    }

    .admin-work-row,
    .notification-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .admin-work-row > span,
    .admin-work-row-actions,
    .notification-actions {
        grid-column: 2;
        justify-content: flex-start;
    }

    .heading-actions .e-btn,
    .form-actions .e-btn {
        width: 100%;
    }

    .media-placeholder {
        min-height: 180px;
    }

    .invitation-cover {
        min-height: 320px;
        padding: 16px;
    }

    .invitation-cover-copy strong {
        font-size: 28px;
    }

    .cover-picker-preview {
        min-height: 210px;
    }
}
