/* Primea Internal - Custom styles (extends Franken UI) */

/* ── Page progress bar ─────────────────────────────── */
.page-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--primea-orange);
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
}

/* ── Global overrides ────────────────────────────────── */
button,
.uk-btn,
[role="button"],
select {
    cursor: pointer;
}

/* ── Form validation ────────────────────────────────── */
.field-error {
    outline: 2px solid hsl(var(--destructive));
    border-radius: 0.375rem;
}

.field-required {
    color: hsl(var(--destructive));
}

.field-validation-msg {
    font-size: 0.78rem;
    color: hsl(var(--destructive));
    margin-top: 0.25rem;
}

.form-error-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    background: hsl(var(--destructive) / 0.1);
    border: 1px solid hsl(var(--destructive) / 0.3);
    color: hsl(var(--destructive));
    font-size: 0.875rem;
    font-weight: 500;
}

/* ── Avatar component ───────────────────────────────── */
.avatar {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.avatar-initials {
    background: var(--primea-orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.avatar-xs { width: 20px; height: 20px; font-size: 0.55rem; }
.avatar-sm { width: 24px; height: 24px; font-size: 0.65rem; }
.avatar-md { width: 32px; height: 32px; font-size: 0.8rem; }
.avatar-lg { width: 40px; height: 40px; font-size: 1rem; }

/* Auth page — gradient background */
.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primea-black) 0%, #1f1109 50%, var(--primea-black) 100%);
    position: relative;
    overflow: hidden;
}

.auth-body::before {
    content: '';
    position: absolute;
    top: 15%;
    right: 8%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236, 96, 43, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-body::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: 5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(29, 75, 213, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.25rem;
    padding: 3rem 2.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.auth-card .auth-logo {
    width: 180px;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
}

.auth-card h1 {
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 0.25rem;
}

.auth-card p {
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: var(--primea-orange);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    text-decoration: none;
}

.btn-google:hover {
    background: var(--primea-orange-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(236, 96, 43, 0.35);
}

.auth-footer {
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.8rem;
}

/* ── Mobile top bar ──────────────────────────────────── */
.mobile-topbar {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: var(--primea-black);
    position: sticky;
    top: 0;
    z-index: 200;
}
.mobile-topbar-logo {
    height: 1.4rem;
    filter: brightness(0) invert(1);
}
.mobile-hamburger {
    background: none;
    border: none;
    color: #fff;
    padding: 0.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mobile-hamburger svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* ── Sidebar backdrop (mobile only) ─────────────────── */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 299;
    pointer-events: none;
    opacity: 0;
}
.sidebar-backdrop.open {
    display: block;
    pointer-events: auto;
    opacity: 1;
}

/* ── App shell ────────────────────────────────────────── */
.app-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────── */
.sidebar {
    background: var(--primea-black);
    color: #fff;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-logo {
    height: 1.75rem;
    filter: brightness(0) invert(1);
}

.sidebar-section {
    padding: 0 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sidebar-section + .sidebar-section .sidebar-section-label {
    border-top: none;
}


.sidebar-section-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
    margin: 0 -0.75rem;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}
.sidebar-section-label:hover {
    color: rgba(255, 255, 255, 0.55);
}
.sidebar-chevron {
    margin-left: auto;
    width: 14px;
    height: 14px;
    transition: transform 0.15s ease;
    transform: rotate(90deg);
    opacity: 0.6;
}
.sidebar-section.collapsed .sidebar-chevron {
    transform: rotate(0deg);
}
.sidebar-section.collapsed .sidebar-link {
    display: none;
}

.sidebar-section-label + .sidebar-link {
    margin-top: 0;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem 0.55rem 1.25rem;
    margin-left: 0.75rem;
    border-radius: 0;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.9rem;
    transition: border-color 0.12s, color 0.12s;
}

.sidebar-link:hover {
    border-left-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.sidebar-link.active {
    border-left-color: var(--primea-orange);
    color: var(--primea-orange);
}

.sidebar-badge {
    margin-left: auto;
    background: var(--primea-orange);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    padding: 0 5px;
}

.sidebar-badge-urgent {
    background: hsl(var(--destructive));
    margin-left: auto;
}
.sidebar-badge-urgent + .sidebar-badge {
    margin-left: 0.25rem;
}

.sidebar-icon {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-version {
    padding: 0.25rem 1.25rem;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
}

.sidebar-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primea-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    border-radius: 0.375rem;
    padding: 0.25rem;
    margin: -0.25rem;
    transition: background 0.12s;
}
.sidebar-user-link:hover {
    background: rgba(255, 255, 255, 0.06);
}
.sidebar-user-link:hover .sidebar-user-name {
    color: rgba(255, 255, 255, 0.95);
}
.sidebar-user-role {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
}
.sidebar-footer-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.sidebar-settings-btn,
.sidebar-logout-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.85rem;
    border-radius: 0.25rem;
    transition: color 0.12s;
    text-decoration: none;
}

.sidebar-settings-btn:hover,
.sidebar-logout-btn:hover {
    color: var(--primea-orange);
}

/* ── Main content area ────────────────────────────────── */
.main-content {
    padding: 2rem 2.5rem;
    background: hsl(var(--background));
    overflow-y: auto;
}

/* ── Mobile layout overrides (after base styles) ─────── */
@media (max-width: 768px) {
    .app-shell {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
    .mobile-topbar { display: flex; }
    .main-content { flex: 1; padding: 1rem; }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px;
        height: 100vh;
        z-index: 300;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-section-label {
        pointer-events: none;
    }
    .sidebar-chevron {
        display: none;
    }
    .sidebar-section.collapsed .sidebar-link {
        display: flex;
    }
}

/* ── Dashboard ────────────────────────────────────────── */
.db-greeting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.db-greeting h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}
.db-greeting h1 span { color: hsl(var(--muted-foreground)); font-weight: 400; }
.db-greeting-right {
    display: flex;
    gap: 0.5rem;
}
.db-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid var(--primea-grey-border);
    background: hsl(var(--card));
    color: hsl(var(--foreground));
}
.db-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.db-pill-dot.orange { background: var(--primea-orange); }
.db-pill-dot.blue { background: var(--primea-blue); }
.db-pill-dot.green { background: #16a34a; }

/* Next event banner */
.db-next-banner {
    display: flex;
    height: 140px;
    color: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    text-decoration: none;
    transition: transform 0.15s;
    background: linear-gradient(135deg, rgba(29,75,213,0.15), rgba(236,96,43,0.3)), var(--primea-black);
}
.db-next-banner:hover { transform: translateY(-2px); color: #fff; }
.db-nb-visual {
    width: 200px;
    flex-shrink: 0;
    background: var(--primea-black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255,255,255,0.15);
}
.db-nb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.db-nb-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.4;
}
.db-nb-kicker {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primea-orange);
    font-weight: 700;
    margin: 0 0 0.35rem;
    line-height: 1;
}
.db-nb-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.25rem;
    line-height: 1.2;
}
.db-nb-meta {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin: 0;
    line-height: 1.3;
}
.db-nb-arrow {
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    color: rgba(255,255,255,0.3);
}

/* Banner agenda */
.db-banner-agenda {
    background: hsl(var(--card));
    border: 1px solid var(--primea-grey-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.db-banner-agenda-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}
.db-agenda-day { margin-bottom: 0.75rem; }
.db-agenda-day:last-child { margin-bottom: 0; }
.db-agenda-day-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.35rem;
}
.db-agenda-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0;
    font-size: 0.85rem;
}
.db-agenda-icon {
    width: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--muted-foreground));
}
.db-agenda-icon svg {
    width: 14px;
    height: 14px;
}
.db-agenda-time {
    width: 3rem;
    flex-shrink: 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}
.db-agenda-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.db-agenda-item-title { font-weight: 500; }
.db-agenda-item-desc {
    color: hsl(var(--muted-foreground));
    font-size: 0.8rem;
}
.db-agenda-url-icon {
    display: flex;
    align-items: center;
    align-self: center;
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
}
.db-agenda-url-icon i {
    width: 10px;
    height: 10px;
}
.db-agenda-url-icon:hover {
    color: hsl(var(--foreground));
}
.db-agenda-past {
    opacity: 0.5;
}
.db-agenda-past .db-agenda-item-title {
    text-decoration: line-through;
}
.db-agenda-item-link {
    text-decoration: none;
    color: inherit;
    border-radius: 4px;
}
.db-agenda-item-link:hover .db-agenda-item-title,
a.db-agenda-item-link:hover {
    color: var(--primea-orange);
}

/* Two-column layout */
.db-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-rows: 1fr;
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 1.5rem;
}
.db-layout > div:first-child .db-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.db-layout > div:first-child .db-card .db-card-body {
    flex: 1;
}

/* Shared card */
.db-card {
    background: hsl(var(--card));
    border: 1px solid var(--primea-grey-border);
    border-radius: 0.75rem;
    overflow: hidden;
}
.db-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--primea-grey-border);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.db-card-header a {
    font-size: 0.72rem;
    color: var(--primea-orange);
    text-decoration: none;
    font-weight: 600;
}
.db-card-body { padding: 0; }

/* Upcoming events list */
.db-ev-stack .db-ev-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.55rem 1.25rem;
    border-bottom: 1px solid var(--primea-grey-border);
    text-decoration: none;
    color: inherit;
    transition: background 0.12s;
    margin: 0;
    box-sizing: border-box;
    font-size: 0.85rem;
    line-height: 1.4;
}
.db-ev-stack .db-ev-row:last-child { border-bottom: none; }
.db-ev-stack .db-ev-row:hover { background: hsl(var(--muted)); }
.db-ev-row-sub { padding-left: 1.5rem; }
.db-ev-day {
    width: 44px;
    flex-shrink: 0;
    text-align: center;
    background: #fde8d0;
    border-radius: 0.5rem;
    padding: 0.3rem 0.25rem;
    line-height: 1;
}
.db-ev-day-num { font-size: 1.3rem; font-weight: 700; line-height: 1; }
.db-ev-day-label { font-size: 0.6rem; color: hsl(var(--muted-foreground)); text-transform: uppercase; font-weight: 600; }
.db-ev-mid { flex: 1; min-width: 0; }
.db-ev-mid-title { font-weight: 600; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; line-height: 1.3; }
.db-ev-mid-sub { font-size: 0.72rem; color: hsl(var(--muted-foreground)); margin: 0.1rem 0 0; line-height: 1.2; }
.db-ev-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.db-ev-rsvp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    flex-shrink: 0;
}
.db-ev-right .uk-badge {
    min-width: 5.5rem;
    text-align: center;
    justify-content: center;
}
.db-ev-avatars {
    display: flex;
}
.db-ev-att {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid hsl(var(--card));
    margin-left: -8px;
    flex-shrink: 0;
    object-fit: cover;
}
.db-ev-att:first-child { margin-left: 0; }
.db-ev-going-mobile {
    display: none;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
}
.db-ev-att-initial {
    background: var(--primea-orange);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}
.db-ev-att-more {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Quick actions */
.db-actions {
    display: flex;
    flex-direction: column;
}
.db-action-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    border-bottom: 1px solid var(--primea-grey-border);
    transition: background 0.12s;
}
.db-action-link:last-child { border-bottom: none; }
.db-action-link:hover { background: hsl(var(--muted)); }
.db-action-icon {
    width: 32px;
    height: 32px;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.db-action-icon.orange { background: rgba(236,96,43,0.1); }
.db-action-icon.blue { background: rgba(29,75,213,0.1); }
.db-action-icon.green { background: rgba(34,197,94,0.1); }
.db-action-arrow {
    margin-left: auto;
    color: var(--primea-grey-light);
    font-size: 0.9rem;
}

/* Your stats grid */
.db-you-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0;
}
.db-you-cell {
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--primea-grey-border);
    line-height: 1;
}
.db-you-cell:nth-child(odd) { border-right: 1px solid var(--primea-grey-border); }
.db-you-cell:nth-last-child(-n+2) { border-bottom: none; }
.db-you-val { font-size: 0.82rem; font-weight: 800; line-height: 1; flex-shrink: 0; margin: 0; }
.db-you-val.orange { color: var(--primea-orange); }
.db-you-val.blue { color: var(--primea-blue); }
.db-you-val.green { color: #16a34a; }
.db-you-label { font-size: 0.72rem; color: hsl(var(--muted-foreground)); line-height: 1.2; margin: 0; white-space: nowrap; }

/* Sidebar */
.db-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}
.db-sidebar .db-card:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.db-sidebar .db-card:last-child .db-card-body {
    flex: 1;
}

/* Year overview timeline */
.db-timeline {
    background: hsl(var(--card));
    border: 1px solid var(--primea-grey-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    overflow: hidden;
}
.db-tl-header {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.db-tl-scroll {
    overflow-x: auto;
    scrollbar-width: none;
}
.db-tl-scroll::-webkit-scrollbar { display: none; }
.db-tl-track {
    display: flex;
    align-items: flex-start;
    min-width: max-content;
    position: relative;
    padding: 0 1rem;
}
.db-tl-track::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--primea-grey-border);
}
.db-tl-month {
    width: 100px;
    text-align: center;
    flex-shrink: 0;
    position: relative;
}
.db-tl-month-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.75rem;
}
.db-tl-month.current .db-tl-month-label {
    color: var(--primea-orange);
    font-weight: 700;
}
.db-tl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primea-grey-border);
    margin: 0 auto 0.5rem;
    position: relative;
    z-index: 1;
}
.db-tl-month.current .db-tl-dot { background: var(--primea-orange); box-shadow: 0 0 0 3px rgba(236,96,43,0.2); }
.db-tl-month.has-events .db-tl-dot { background: var(--primea-orange); }
.db-tl-count {
    font-size: 0.65rem;
    color: hsl(var(--muted-foreground));
}
.db-tl-month.past { opacity: 0.4; }

@media (max-width: 900px) {
    .db-layout { grid-template-columns: 1fr; }
    .db-nb-visual { width: 120px; }
    .db-greeting { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .db-greeting-right { flex-wrap: wrap; }
    .db-ev-right { display: none; }
    .db-ev-going-mobile { display: flex; }
    .db-ev-stack .db-ev-row { gap: 0.5rem; padding: 0.55rem 0.75rem; }
}

/* ── Badges ───────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-upcoming { background: #d4edda; color: #155724; }
.badge-ongoing { background: #fff3cd; color: #856404; }
.badge-past { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.badge-cancelled { background: #f8d7da; color: #721c24; }
.badge-going { background: var(--primea-orange); color: #fff; }
.badge-went { background: #d4edda; color: #155724; }
.badge-category { background: #e7e3ff; color: #4a3f8a; }
.badge-hackaway { background: #e7e3ff; color: #4a3f8a; }
.badge-social { background: #d4edda; color: #155724; }
.badge-pubcrawl { background: #fff3cd; color: #856404; }
.badge-office { background: #cce5ff; color: #004085; }
.badge-learning { background: #f0d4ec; color: #7a2d6d; }
.badge-other { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.badge-hpf { background: #fef3c7; color: #92400e; }
.badge-afterwork { background: #fde8d0; color: #9a3412; }
.badge-sport { background: #d1fae5; color: #065f46; }
.badge-pts { background: #dbeafe; color: #1e40af; }
.badge-workaway { background: #ede9fe; color: #5b21b6; }
.badge-dinner { background: #fef3c7; color: #92400e; }
.badge-teambuilding { background: #ccfbf1; color: #134e4a; }
.badge-tbd { background: #e2e3e5; color: #383d41; }
.badge-wip { background: #fff3cd; color: #856404; }
.badge-urgent { background: hsl(var(--destructive)); color: #fff; font-weight: 700; }
.badge-wellness { background: #d1fae5; color: #065f46; }
.badge-purchase_budget { background: #e0e7ff; color: #3730a3; }
.badge-company { background: #fef3c7; color: #92400e; }
.badge-primary { background: var(--primea-orange); color: #fff; }
.badge-grant { background: #dcfce7; color: #166534; }
.badge-manual { background: #f3e8ff; color: #6b21a8; }
.badge-muted { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.badge-received { background: #d1fae5; color: #065f46; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-economy { background: #dbeafe; color: #1e40af; }
.badge-requested { background: #fef3c7; color: #92400e; }
.badge-purchased { background: #dbeafe; color: #1e40af; }
.badge-arrived { background: #d1fae5; color: #065f46; }
.badge-draft { background: transparent; color: hsl(var(--muted-foreground)); border: 1.5px dashed hsl(var(--muted-foreground) / 0.5); }
.badge-primea_card { background: var(--primea-orange); color: #fff; }
.badge-own_card { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.badge-invoice { background: #fecaca; color: #991b1b; }
.entry-row-draft { border-left: 3px solid var(--primea-orange); display: flex; cursor: pointer; }
.entry-row-draft:hover { background: hsl(var(--muted) / 0.3); }

/* ── Receipt received toggle ─────────────────────────── */
.receipt-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.75rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.receipt-mark-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border: none;
    border-radius: 0.375rem;
    background: var(--primea-orange);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.receipt-mark-btn:hover { opacity: 0.85; }

.receipt-undo-btn {
    display: inline;
    padding: 0;
    border: none;
    background: none;
    color: hsl(var(--muted-foreground));
    font-size: 0.65rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.receipt-undo-btn:hover { color: hsl(var(--foreground)); }

.entry-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid hsl(var(--border));
    border-radius: 0.375rem;
    background: hsl(var(--card));
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
}
.entry-action-btn:hover {
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
}
.entry-action-btn-primary {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}
.entry-action-btn-primary:hover {
    opacity: 0.85;
}
.entry-action-btn-danger {
    color: hsl(var(--destructive));
}
.entry-action-btn-danger:hover {
    background: hsl(var(--destructive));
    color: #fff;
}

/* ── Admin receipt grid cards ─────────────────────────── */
.rc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
@media (max-width: 768px) {
    .rc-grid { grid-template-columns: 1fr; }
}
.rc-grid-single {
    grid-template-columns: 1fr;
}
.rc-card {
    background: hsl(var(--card));
    border: 1px solid var(--primea-grey-border);
    border-radius: 0.625rem;
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.rc-card-done { opacity: 0.5; }
.rc-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.rc-card-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--primea-orange); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.75rem; flex-shrink: 0;
}
.rc-card-name { font-weight: 600; font-size: 0.9rem; }
.rc-card-date {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--primea-grey-light);
    white-space: nowrap;
}
.rc-card-title {
    font-size: 0.85rem;
    color: var(--primea-grey);
}
.rc-card-badges {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.rc-card-meta {
    font-size: 0.8rem;
    color: var(--primea-grey-light);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}
.rc-card-footer {
    border-top: 1px dashed var(--primea-grey-border);
    padding-top: 0.65rem;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.rc-grid-compact {
    gap: 0;
}
.rc-card-compact {
    padding: 0.65rem 1rem;
    gap: 0.2rem;
    border-radius: 0;
    border-bottom-width: 0;
}
.rc-card-compact:first-child {
    border-radius: 0.625rem 0.625rem 0 0;
}
.rc-card-compact:last-child {
    border-radius: 0 0 0.625rem 0.625rem;
    border-bottom-width: 1px;
}
.rc-card-compact:only-child {
    border-radius: 0.625rem;
}
.rc-card-compact .rc-card-header {
    gap: 0.5rem;
}
.rc-card-compact .rc-card-badges {
    margin-left: auto;
    flex-wrap: nowrap;
}
.rc-card-compact .rc-card-meta {
    font-size: 0.75rem;
}

/* ── Receipt filters + pagination ────────────────────── */
.rc-filters {
    margin-bottom: 0;
}
.rc-filters-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 0.5rem;
    align-items: center;
}
@media (max-width: 768px) {
    .rc-filters-row {
        grid-template-columns: 1fr 1fr;
    }
}
.rc-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}
.rc-pagination-info {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
}

/* ── Receipt category card tabs ──────────────────────── */
.receipt-card-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.receipt-card-tab {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--primea-grey-border);
    border-radius: 0.625rem;
    background: hsl(var(--card));
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.receipt-card-tab:hover {
    border-color: var(--primea-orange);
}

.receipt-card-tab-active {
    border-color: var(--primea-orange);
    border-left: 3px solid var(--primea-orange);
    background: rgba(236, 96, 43, 0.04);
}

.receipt-card-tab-icon {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

.receipt-card-tab-icon i,
.receipt-card-tab-icon svg {
    width: 18px;
    height: 18px;
}

.receipt-card-tab-active .receipt-card-tab-icon {
    background: rgba(236, 96, 43, 0.1);
    color: var(--primea-orange);
}

.receipt-card-tab-label {
    font-size: 0.78rem;
    color: hsl(var(--muted-foreground));
}

.receipt-card-tab-count {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.receipt-card-tab-active .receipt-card-tab-count {
    color: var(--primea-orange);
}

.receipt-card-tab-budget {
    font-size: 0.7rem;
    color: hsl(var(--muted-foreground));
    line-height: 1;
    margin-top: 0.15rem;
}

/* ── Entry table (user entries list) ──────────────────── */
.entry-table {
    background: hsl(var(--card));
    border: 1px solid var(--primea-grey-border);
    border-radius: 0.625rem;
    overflow: hidden;
}
.entry-table-header,
.entry-row {
    display: grid;
    grid-template-columns: 1fr 140px 100px 100px 110px 90px;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1rem;
}
.entry-col-card {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
}
.entry-col-card-own {
    font-weight: 600;
    color: hsl(var(--foreground));
}
.entry-table-header {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: hsl(var(--muted-foreground));
    border-bottom: 1px solid var(--primea-grey-border);
    padding: 0.5rem 1rem;
}
.entry-row {
    font-size: 0.85rem;
    border-bottom: 1px solid hsl(var(--border));
}
.entry-row:last-child {
    border-bottom: none;
}
.entry-col-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}
.entry-title-text {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.entry-badge-inline {
    flex-shrink: 0;
}
.entry-col-amount {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.entry-col-date {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
}
@media (max-width: 768px) {
    .entry-table-header { display: none; }
    .entry-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 0.15rem 0.5rem;
        padding: 0.65rem 0.85rem;
    }
    .entry-col-title { grid-column: 1; grid-row: 1; }
    .entry-col-amount { grid-column: 2; grid-row: 1; text-align: right; }
    .entry-col-category,
    .entry-col-date,
    .entry-col-status {
        grid-row: 2;
        font-size: 0.75rem;
    }
    .entry-col-category { grid-column: 1; }
    .entry-col-card,
    .entry-col-date { display: none; }
    .entry-col-status { grid-column: 2; text-align: right; }
}

/* Clickable entry rows */
.entry-row-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.1s;
}
.entry-row-link:hover {
    background: hsl(var(--muted));
}
.entry-row-sub {
    padding-left: 2rem;
}

/* Admin events table column layout */
.entry-table-events .entry-table-header,
.entry-table-events .entry-row {
    grid-template-columns: 1fr 80px 160px 120px 40px 60px;
}
.entry-col-going {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.entry-col-rsvp {
    display: flex;
    align-items: center;
    justify-content: center;
}
.entry-col-comments {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
}
@media (max-width: 768px) {
    .entry-table-events .entry-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }
    .entry-table-events .entry-col-going,
    .entry-table-events .entry-col-organizer,
    .entry-table-events .entry-col-rsvp { display: none; }
}

/* Admin receipts table column layout */
.entry-table-receipts .entry-table-header,
.entry-table-receipts .entry-row {
    grid-template-columns: 140px 1fr 90px 100px 100px 40px 200px;
}
.entry-col-user {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.entry-col-file {
    display: flex;
    justify-content: center;
}
.entry-col-actions {
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.entry-title-link {
    font-weight: 600;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.entry-title-link:hover {
    color: var(--primea-orange);
}
.entry-row-done {
    opacity: 0.55;
}
@media (max-width: 768px) {
    .entry-table-receipts .entry-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto auto;
    }
    .entry-table-receipts .entry-col-user { grid-column: 1; grid-row: 1; }
    .entry-table-receipts .entry-col-amount { grid-column: 2; grid-row: 1; text-align: right; }
    .entry-table-receipts .entry-col-title { grid-column: 1 / -1; grid-row: 2; }
    .entry-table-receipts .entry-col-actions { grid-column: 1 / -1; grid-row: 3; }
    .entry-table-receipts .entry-col-card,
    .entry-table-receipts .entry-col-date,
    .entry-table-receipts .entry-col-file { display: none; }
}

/* Draft entries table (5 columns with wider category for long labels) */
.entry-table-drafts .entry-table-header,
.entry-table-drafts .entry-row {
    grid-template-columns: 1fr 140px 200px 100px 100px;
}

/* Purchase-related table column layouts */
.entry-table-purchases .entry-table-header,
.entry-table-purchases .entry-row {
    grid-template-columns: 1fr 60px 90px 100px 40px;
}
@media (max-width: 768px) {
    .entry-table-purchases .entry-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }
    .entry-table-purchases .entry-col-date { display: none; }
}

.entry-table-pending .entry-table-header,
.entry-table-pending .entry-row {
    grid-template-columns: 1fr 60px 90px 90px 100px 40px;
}
@media (max-width: 768px) {
    .entry-table-pending .entry-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }
    .entry-table-pending .entry-col-date,
    .entry-table-pending .entry-col-qty { display: none; }
}

.entry-table-purchased .entry-table-header,
.entry-table-purchased .entry-row {
    grid-template-columns: 1fr 120px 60px 90px 90px 100px 40px;
}
@media (max-width: 768px) {
    .entry-table-purchased .entry-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }
    .entry-table-purchased .entry-col-date,
    .entry-table-purchased .entry-col-qty,
    .entry-table-purchased .entry-col-status { display: none; }
}

.entry-table-admin-purchases .entry-table-header,
.entry-table-admin-purchases .entry-row {
    grid-template-columns: 1fr 120px 60px 90px 120px 40px;
}
@media (max-width: 768px) {
    .entry-table-admin-purchases .entry-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }
    .entry-table-admin-purchases .entry-col-date,
    .entry-table-admin-purchases .entry-col-qty { display: none; }
}

.sg-add-row {
    display: flex;
    gap: 0.5rem;
}
@media (max-width: 768px) {
    .sg-add-row {
        flex-direction: column;
    }
    .sg-add-row .uk-btn { align-self: stretch !important; }
}
.entry-table-suggestions .entry-table-header {
    grid-template-columns: 1fr 70px 100px 110px;
}
.entry-table-suggestions .sg-row {
    grid-template-columns: 1fr auto 100px 110px;
}
.sg-row-meta {
    grid-column: 1;
    font-size: 0.75rem;
}
.sg-row-desc {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    line-height: 1.4;
}
@media (max-width: 768px) {
    .entry-table-suggestions .sg-row {
        grid-template-columns: auto auto 1fr auto;
        gap: 0.15rem 0.5rem;
    }
    .entry-table-suggestions .entry-col-title { grid-column: 1 / -1; grid-row: 1; }
    .entry-table-suggestions .sg-row-meta { grid-column: 1; grid-row: 2; }
    .entry-table-suggestions .sg-col-vote { grid-column: 2; grid-row: 2; display: block; }
    .entry-table-suggestions .entry-col-action { grid-column: 4; grid-row: 2; }
    .entry-table-suggestions .sg-row-desc { grid-column: 1 / -1; grid-row: 3; }
    .entry-table-suggestions .entry-col-hide-mobile { display: none; }
}

.entry-col-qty {
    text-align: center;
}

/* Editable receipt title */
.rc-editable-title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.rc-editable-title-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.4;
    padding: 0.2rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.15s;
}
.rc-editable-title:hover .rc-editable-title-btn {
    opacity: 0.8;
}
.rc-editable-title-btn:hover {
    opacity: 1;
}
.rc-editable-title-empty .rc-editable-title-btn {
    opacity: 0.6;
}
.rc-editable-title-form {
    align-items: center;
    gap: 0.35rem;
}
.rc-editable-title-form input {
    font-size: 1rem;
    font-weight: 600;
    width: 250px;
    color: hsl(var(--foreground));
}

.receipt-file-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--primea-orange);
    text-decoration: none;
}

.receipt-file-link:hover {
    text-decoration: underline;
}

.receipt-file-link svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

.receipt-modal-dialog {
    max-width: 700px;
    width: 90vw;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0;
    overflow: hidden;
    border-radius: 0.75rem;
}

.receipt-modal-dialog img {
    width: 100%;
    max-height: 85vh;
    object-fit: contain;
    display: block;
}

.receipt-modal-dialog iframe {
    width: 100%;
    height: 85vh;
    border: none;
    display: block;
}

.receipt-modal-close {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.receipt-modal-close:hover {
    background: var(--primea-orange);
}

.receipt-modal-download {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    padding: 0.35rem 1rem;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border-radius: 0.5rem;
    text-decoration: none;
    backdrop-filter: blur(4px);
}

.receipt-modal-download:hover {
    background: var(--primea-orange);
    color: #fff;
}

/* ── Receipt file preview (collapsible) ────────────────── */
/* Multi-file upload drop zone + file list */
.rc-file-drop {
    border: 2px dashed var(--primea-grey-border);
    border-radius: 8px;
    padding: 1.25rem;
    cursor: pointer;
    transition: border-color 0.15s;
}
.rc-file-drop:hover {
    border-color: var(--primea-orange);
}
.rc-file-drop-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.85rem;
}
.rc-file-drop-placeholder small {
    font-size: 0.75rem;
    opacity: 0.7;
}
.rc-file-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.5rem;
}
.rc-file-list:empty {
    display: none;
}
.rc-file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: hsl(var(--muted));
    border-radius: 6px;
    font-size: 0.8rem;
}
.rc-file-thumb {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}
.rc-file-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    flex-shrink: 0;
}
.rc-file-remove:hover {
    color: hsl(var(--destructive));
    background: hsl(var(--destructive) / 0.1);
}

.rc-file-preview {
    border: 1px solid var(--primea-grey-border);
    border-radius: 8px;
    background: hsl(var(--card));
    overflow: hidden;
}
.rc-file-preview-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    list-style: none;
    user-select: none;
}
.rc-file-preview-toggle::-webkit-details-marker {
    display: none;
}
.rc-file-preview-toggle span {
    flex: 1;
}
.rc-file-preview-chevron {
    transition: transform 0.2s ease;
    color: hsl(var(--muted-foreground));
}
details[open] > .rc-file-preview-toggle .rc-file-preview-chevron {
    transform: rotate(180deg);
}
.rc-file-preview-content {
    padding: 0 1rem 1rem;
    text-align: center;
}
.rc-file-preview-img {
    max-width: 100%;
    max-height: 600px;
    border-radius: 6px;
    object-fit: contain;
}
.rc-file-preview-pdf {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .receipt-card-tabs {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── RSVP bar ─────────────────────────────────────────── */
.ed-rsvp-bar {
    background: hsl(var(--card));
    border: 1px solid var(--primea-grey-border);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
}

.ed-rsvp-prompt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ed-rsvp-question {
    font-size: 0.95rem;
    font-weight: 600;
}

.ed-rsvp-actions {
    display: flex;
    gap: 0.5rem;
}

.ed-rsvp-confirmed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ed-rsvp-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.ed-rsvp-icon-going {
    color: #22c55e;
}

.ed-rsvp-icon-not-going {
    color: #ef4444;
}

.ed-rsvp-icon-interested {
    color: #eab308;
}

/* ── Organizer actions ────────────────────────────────── */
.organizer-actions {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    padding-top: 1rem;
    border-top: 1px solid hsl(var(--border));
}

/* ── Profile ──────────────────────────────────────────── */
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-hero-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
}

.profile-hero-avatar-clickable {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.profile-hero-avatar-clickable:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.profile-hero-initials {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--primea-orange);
    color: #fff;
    font-size: 2.2rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    text-transform: uppercase;
}

.profile-hero-nickname {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin: -0.5rem 0 0.5rem;
}

.profile-hero::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(236, 96, 43, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.profile-admin-edit,
.ed-hero-actions .uk-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    font-size: 0.8rem;
    padding: 0.35rem 1rem;
    background: #fff;
    color: var(--primea-black);
    border-color: rgba(255, 255, 255, 0.6);
}

.profile-admin-edit:hover,
.ed-hero-actions .uk-btn:hover {
    background: var(--primea-orange);
    color: #fff;
    border-color: var(--primea-orange);
}

.ed-hero-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    display: flex;
    gap: 0.5rem;
}

.ed-hero-actions .uk-btn {
    position: static;
}

.ed-hero-actions .uk-btn-destructive {
    background: #fff;
    color: #dc2626;
    border-color: rgba(255, 255, 255, 0.6);
}

.ed-hero-actions .uk-btn-destructive:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.badge-admin { background: rgba(236, 96, 43, 0.2); color: var(--primea-orange); }
.badge-organizer { background: #e7e3ff; color: #4a3f8a; }
.badge-employee { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }

/* ── Achievements ─────────────────────────────────────── */

/* Hero banner */
.ach-hero {
    position: relative;
    background: var(--primea-black);
    border-radius: 0.75rem;
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
    overflow: hidden;
}

.ach-hero::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(236, 96, 43, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ach-hero-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(236, 96, 43, 0.15);
    color: var(--primea-orange);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.ach-hero-icon svg {
    width: 28px;
    height: 28px;
}

.ach-hero-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.25rem;
    position: relative;
    z-index: 1;
}

.ach-hero-subtitle {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
    margin: 0;
    position: relative;
    z-index: 1;
}

.ach-hero-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-end;
}

.ach-hero-action {
    font-size: 0.8rem;
    padding: 0.35rem 1rem;
    background: #fff;
    color: var(--primea-black);
    border-color: rgba(255, 255, 255, 0.6);
}

.ach-hero-action:hover {
    background: var(--primea-orange);
    color: #fff;
    border-color: var(--primea-orange);
}

/* Achievement grid & cards */
.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 140px);
    gap: 1rem;
    justify-content: space-evenly;
}

.achievement-card-wrap {
    position: relative;
}

.achievement-card {
    text-align: center;
    padding: 1rem;
    width: 140px;
    height: 195px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: opacity 0.2s;
}

.achievement-card.locked {
    opacity: 0.45;
    filter: grayscale(0.8);
}

.achievement-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.achievement-name {
    font-size: 0.78rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.achievement-rarity {
    font-size: 0.65rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.2rem;
}

/* Tooltip */
.achievement-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--primea-black);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.78rem;
    line-height: 1.4;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 10;
}

.achievement-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--primea-black);
}

.achievement-card-wrap:hover .achievement-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Small image variant (used in admin/dashboard) */
.achievement-img-small {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.achievement-grant {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}

.earned-badge {
    background: #d4edda;
    color: #155724;
}

.achievement-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid hsl(var(--border));
}

.achievement-badge.locked {
    opacity: 0.5;
}

/* ── People grid ─────────────────────────────────────── */
.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.people-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem 0.75rem;
    background: hsl(var(--card));
    border: 1px solid var(--primea-grey-border);
    border-radius: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.people-card:hover {
    border-color: var(--primea-orange);
    box-shadow: 0 4px 12px rgba(236, 96, 43, 0.1);
    color: inherit;
}

.people-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.6rem;
}

.people-card-initials,
.people-card-avatar.avatar-initials {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primea-orange);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
}

.people-card-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 0.15rem;
}

.people-card-nickname {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.4rem;
}

.people-card-active {
    font-size: 0.7rem;
    color: hsl(var(--muted-foreground));
}

/* ── Achievement toggle rows (admin user edit) ───────── */
.ach-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid hsl(var(--border));
}

.ach-toggle-row:last-child {
    border-bottom: none;
}

.ach-toggle-info {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    font-weight: 600;
}

.ach-toggle-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 2rem;
    border: 1px solid;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ach-toggle-btn.earned {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.ach-toggle-btn.earned:hover {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.ach-toggle-btn.unearned {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    border-color: hsl(var(--border));
}

.ach-toggle-btn.unearned:hover {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

/* ── Toast notifications ──────────────────────────────── */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    background: #323232;
    color: #fff;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 400px;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.error {
    background: #dc3545;
}

/* ── Error page ───────────────────────────────────────── */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

/* ── Filters ──────────────────────────────────────────── */
.filters {
    margin-bottom: 1.5rem;
}

/* ── Event form hero (image + title/dates) ───────────── */
.event-form-hero {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: start;
}

.event-form-hero-fields {
    display: flex;
    flex-direction: column;
}

.event-form-hero-fields label:first-child {
    margin-top: 0;
}

/* ── Image upload dropzone ────────────────────────────── */
.img-upload {
    position: relative;
    border: 2px dashed var(--primea-grey-border);
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    aspect-ratio: 1;
}

.img-upload:hover {
    border-color: var(--primea-orange);
    background: rgba(236, 96, 43, 0.03);
}

.img-upload-compact {
    aspect-ratio: 16/9;
    max-height: 200px;
}

.img-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    height: 100%;
    padding: 1rem;
    color: var(--primea-grey-light);
    text-align: center;
}

.img-upload-placeholder svg {
    opacity: 0.5;
    margin-bottom: 0.15rem;
}

.img-upload-placeholder span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primea-grey);
}

.img-upload-placeholder small {
    font-size: 0.7rem;
}

.img-upload-preview {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-upload-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.2s;
}

.img-upload:hover .img-upload-overlay {
    opacity: 1;
}

.img-upload-overlay span {
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 0.4rem;
}

.img-upload-remove {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 24px;
    height: 24px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    z-index: 2;
}

.img-upload:hover .img-upload-remove {
    opacity: 1;
}

.img-upload-remove:hover {
    background: #dc3545;
}

/* ── Avatar upload (circular) ────────────────────────── */
.avatar-upload {
    position: relative;
    width: 120px;
    height: 120px;
    border: 2px dashed var(--primea-grey-border);
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.avatar-upload:hover {
    border-color: var(--primea-orange);
    background: rgba(236, 96, 43, 0.03);
}

.avatar-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    height: 100%;
    color: var(--primea-grey-light);
    text-align: center;
}

.avatar-upload-placeholder svg {
    opacity: 0.5;
}

.avatar-upload-placeholder small {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--primea-grey);
}

.avatar-upload-google {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    position: absolute;
    inset: 0;
}

.avatar-upload-placeholder small {
    position: relative;
    z-index: 1;
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
}

.avatar-upload-preview {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.avatar-upload:hover .avatar-upload-overlay {
    opacity: 1;
}

.avatar-upload-overlay span {
    color: #fff;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 0.4rem;
}

.avatar-upload-remove {
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    width: 22px;
    height: 22px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    z-index: 2;
}

.avatar-upload:hover .avatar-upload-remove {
    opacity: 1;
}

.avatar-upload-remove:hover {
    background: #dc3545;
}

/* ── Page heading ────────────────────────────────────── */
.page-heading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.page-heading i,
.page-heading svg {
    width: 24px;
    height: 24px;
    color: var(--primea-orange);
    flex-shrink: 0;
}

.page-heading .uk-btn i,
.page-heading .uk-btn svg {
    width: 16px;
    height: 16px;
    color: inherit;
}

.page-heading h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

/* ── Form fields ─────────────────────────────────────── */
.form-field {
    margin-bottom: 1.25rem;
}

.form-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.3rem;
}

/* ── Toggle switches ──────────────────────────── */
.toggle-row {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.toggle-row > label.toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1;
    color: hsl(var(--foreground));
    cursor: pointer;
    margin-bottom: 0;
}

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

.toggle-track {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
    background: hsl(var(--muted-foreground) / 0.3);
    border: 1px solid hsl(var(--muted-foreground) / 0.4);
    border-radius: 10px;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.toggle-track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.toggle input:checked + .toggle-track {
    background: var(--primea-orange);
    border-color: var(--primea-orange);
}

.toggle input:checked + .toggle-track::after {
    transform: translateX(14px);
}

/* ── Category card grid ───────────────────────── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.cat-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: hidden;
    border: 2px solid hsl(var(--border));
    border-radius: 0.5rem;
    background: hsl(var(--card));
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-size: 0.8rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
}

.cat-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    flex-shrink: 0;
    background: var(--primea-black);
    color: #fff;
}

.cat-card-icon i,
.cat-card-icon svg {
    width: 18px;
    height: 18px;
}

.cat-card span {
    display: flex;
    align-items: center;
    padding: 0.2rem 0.75rem;
}

.cat-card:hover {
    border-color: hsl(var(--muted-foreground));
}

.cat-card-active {
    border-color: var(--primea-orange);
    color: hsl(var(--foreground));
}

.cat-card-active .cat-card-icon {
    color: var(--primea-orange);
}

label {
    cursor: default;
}

label:hover {
    color: inherit;
    text-decoration: none;
}

.uk-badge {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    border-radius: 1rem;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.4;
    min-height: 0;
    height: auto;
    pointer-events: none;
    white-space: nowrap;
    vertical-align: middle;
}

/* ── Grid layout helper ──────────────────────────────── */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ── Event detail page ────────────────────────────────── */
.event-detail {
    max-width: 960px;
    margin: 0 auto;
}

/* ── Sticky save bar (edit mode) ────────────────── */
.ed-sticky-save {
    position: fixed;
    top: 0;
    left: 240px;
    right: 0;
    z-index: 50;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    padding: 0.5rem 2.5rem;
    background: transparent;
    pointer-events: none;
}
.ed-sticky-save > * {
    pointer-events: auto;
}
.ed-has-sticky-save {
    padding-top: 3rem;
}
@media (max-width: 768px) {
    .ed-sticky-save {
        left: 0;
        padding: 0.5rem 1rem;
        top: 48px; /* below mobile topbar */
    }
}

.ed-hero {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    min-height: 260px;
    display: flex;
    align-items: flex-end;
    background: var(--primea-black);
}

.ed-hero-no-img {
    min-height: 180px;
}

.ed-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ed-hero-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 3rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
}

.ed-hero-no-img .ed-hero-overlay {
    background: none;
    padding-top: 1.5rem;
}

.ed-hero-badges {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.ed-hero-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.75rem;
    line-height: 1.25;
}

/* Info cards grid */
.ed-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.ed-info-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: hsl(var(--card));
    border: 1px solid var(--primea-grey-border);
    border-radius: 0.625rem;
    padding: 0.85rem 1rem;
    min-width: 0;
}

.ed-info-card > div:last-child {
    min-width: 0;
}

.ed-info-icon {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    background: rgba(236, 96, 43, 0.1);
    color: var(--primea-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ed-info-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: hsl(var(--muted-foreground));
}

.ed-info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Going info card – clickable with avatar row */
.ed-info-card-btn {
    cursor: pointer;
    border: 1px solid var(--primea-grey-border);
    font: inherit;
    transition: border-color 0.15s;
}
.ed-info-card-btn:hover {
    border-color: var(--primea-orange);
}
.ed-info-card-content {
    min-width: 0;
}
.ed-going-row {
    display: flex;
    align-items: center;
    margin-top: 0.15rem;
}
.ed-going-avatars {
    display: flex;
    align-items: center;
}
.ed-going-att {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid hsl(var(--card));
    margin-left: -8px;
    flex-shrink: 0;
    object-fit: cover;
}
.ed-going-att:first-child { margin-left: 0; }
.ed-going-att-initial {
    background: var(--primea-orange);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}
.ed-going-att-more {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Attendees modal */
.ed-attendees-modal {
    max-width: 480px;
    border-radius: 0.75rem;
    max-height: 85vh;
}
.ed-attendees-modal .uk-modal-header {
    border-bottom: 1px solid var(--primea-grey-border);
    padding: 1rem 1.25rem;
}
.ed-attendees-modal .uk-modal-title {
    font-size: 1rem;
    font-weight: 600;
}
.ed-attendees-modal .uk-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    max-height: calc(85vh - 60px);
}

/* Sections */
.ed-section {
    background: hsl(var(--card));
    border: 1px solid var(--primea-grey-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-top: 1rem;
}

.ed-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.ed-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: hsl(var(--muted-foreground));
    margin: 0;
    white-space: pre-line;
}

.ed-empty {
    font-size: 0.85rem;
    color: var(--primea-grey-light);
    margin: 0;
}

/* Internal notes — managers-only restricted block */
.ed-section-internal {
    border-style: dashed;
    background: hsl(var(--muted));
}

/* Google Calendar integration */
.ed-gcal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
}
.ed-gcal-badge-linked {
    background: hsl(142 71% 45% / 0.15);
    color: hsl(142 71% 35%);
}
.ed-gcal-unlink {
    background: none;
    border: none;
    cursor: pointer;
    color: hsl(142 71% 45% / 0.6);
    padding: 0.15rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    margin-left: 0.1rem;
}
.ed-gcal-unlink:hover {
    color: hsl(var(--destructive));
}
.ed-gcal-modal {
    border: none;
    border-radius: 12px;
    padding: 0;
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
    max-width: 440px;
    width: 90vw;
    inset: 0;
    margin: auto;
}
.ed-gcal-modal::backdrop {
    background: rgba(0,0,0,0.4);
}
.ed-gcal-modal-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ed-gcal-modal-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}
.ed-gcal-modal-desc {
    margin: 0;
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
}
.ed-gcal-modal-content form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ed-gcal-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

/* Manage actions */
.ed-manage-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Attendees */
.ed-attendees {
    display: flex;
    flex-direction: column;
}

.ed-attendee {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid hsl(var(--border));
    text-decoration: none;
    color: inherit;
    transition: padding-left 0.12s;
}

.ed-attendee:last-child { border-bottom: none; }
.ed-attendee:hover { padding-left: 0.3rem; }

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

.ed-attendee-initials,
.ed-attendee-avatar.avatar-initials {
    background: var(--primea-orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.ed-attendee-info {
    flex: 1;
    min-width: 0;
}

.ed-attendee-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.ed-attendee-date {
    font-size: 0.7rem;
    color: var(--primea-grey-light);
}

.ed-attendee-group-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ed-attendee-group-not-going {
    border-top: 1px solid var(--primea-grey-border);
    margin-top: 1rem;
    padding-top: 0.75rem;
}

.ed-attendee-not-going {
    opacity: 0.7;
}

.ed-manage-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--primea-grey-border);
}

.ed-manage-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.5rem;
}

.ed-parent-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.15s;
}
.ed-parent-link:hover {
    color: var(--primea-orange);
}

.ed-sub-events {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.ed-sub-event {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--primea-grey-border);
    background: hsl(var(--card));
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
}
.ed-sub-event:hover {
    border-color: var(--primea-orange);
}
.ed-sub-event-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.ed-sub-event-title {
    font-weight: 600;
    font-size: 0.9rem;
}
.ed-sub-event-meta {
    font-size: 0.78rem;
    color: hsl(var(--muted-foreground));
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.ed-sub-event-count {
    font-size: 0.78rem;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
}

/* ── Agenda ─────────────────────────────────────── */
.ed-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.ed-section-title-row .ed-section-title {
    margin-bottom: 0;
}
.ed-agenda-day {
    margin-bottom: 1rem;
}
.ed-agenda-day-header {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primea-orange);
    padding-bottom: 0.35rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--primea-orange);
}
.ed-agenda-entry {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    background: hsl(var(--muted) / 0.35);
    margin-bottom: 0.35rem;
}
.ed-agenda-time {
    flex-shrink: 0;
    width: 6rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    padding-top: 0.1rem;
}
.ed-agenda-content {
    flex: 1;
    min-width: 0;
}
.ed-agenda-entry-title {
    font-weight: 600;
    font-size: 0.88rem;
}
.ed-agenda-entry-desc {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.15rem;
}
.ed-agenda-subevent-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: inherit;
    flex-wrap: wrap;
}
.ed-agenda-subevent-link:hover .ed-agenda-entry-title {
    color: var(--primea-orange);
}
.ed-agenda-going-count {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}
.ed-agenda-icon-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.25rem;
}
.ed-agenda-icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primea-grey-border);
    border-radius: 6px;
    background: hsl(var(--muted) / 0.3);
    cursor: pointer;
    padding: 0;
    color: hsl(var(--foreground));
    transition: border-color 0.15s, background 0.15s;
}
.ed-agenda-icon-btn svg {
    width: 16px;
    height: 16px;
}
.ed-agenda-icon-btn:hover {
    border-color: hsl(var(--muted-foreground));
    background: hsl(var(--muted) / 0.6);
}
.ed-agenda-icon-btn.active {
    border-color: var(--primea-orange);
    background: var(--primea-orange-focus);
    color: var(--primea-orange);
}
.ed-agenda-add-form {
    border: 2px dashed var(--primea-grey-border);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.75rem;
}
.ed-agenda-form-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.ed-agenda-form-field {
    flex: 1;
    min-width: 120px;
}
.ed-agenda-form-field label {
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
    display: block;
}
/* ── Inline agenda edit (edit page) ──────────────── */
.ed-agenda-edit-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    background: hsl(var(--muted) / 0.35);
    margin-bottom: 0.35rem;
}
.ed-agenda-edit-input {
    font-size: 0.82rem;
    padding: 0.25rem 0.4rem;
    border: 1px solid var(--primea-grey-border);
    border-radius: 4px;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.4;
}
.ed-agenda-edit-input:focus {
    outline: none;
    border-color: var(--primea-orange);
    box-shadow: 0 0 0 2px var(--primea-orange-focus);
}
.ed-agenda-edit-time {
    width: 5.5rem;
    flex-shrink: 0;
}
.ed-agenda-edit-title {
    flex: 2;
    min-width: 80px;
    font-weight: 600;
}
.ed-agenda-edit-desc {
    flex: 3;
    min-width: 80px;
}
.ed-agenda-edit-url {
    flex: 2;
    min-width: 80px;
}
.ed-agenda-entry-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: inherit;
    text-decoration: none;
}
.ed-agenda-entry-link:hover {
    text-decoration: underline;
}
.ed-agenda-url-icon {
    display: inline-flex;
    align-items: center;
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
    margin-left: 0.25rem;
}
.ed-agenda-url-icon:hover {
    color: hsl(var(--foreground));
}
.ed-agenda-edit-icon-wrap {
    position: relative;
    flex-shrink: 0;
}
.ed-agenda-inline-icon-picker {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    background: hsl(var(--background));
    border: 1px solid var(--primea-grey-border);
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 0.25rem;
    width: max-content;
    max-width: 280px;
}
.ed-agenda-inline-icon-grid {
    gap: 0.25rem !important;
}
@media (max-width: 640px) {
    .ed-agenda-entry {
        flex-direction: column;
        gap: 0.25rem;
    }
    .ed-agenda-time {
        width: auto;
    }
    .ed-agenda-edit-form {
        flex-wrap: wrap;
    }
    .ed-agenda-edit-time {
        width: 100%;
    }
    .ed-agenda-edit-title,
    .ed-agenda-edit-desc,
    .ed-agenda-edit-url {
        flex: 1 1 100%;
    }
    .ed-agenda-form-row {
        flex-direction: column;
    }
}

.ed-manage-form {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ed-attendee-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ed-attendee-row .ed-attendee {
    flex: 1;
    min-width: 0;
}

.ed-attendee-remove {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.ed-attendee-remove:hover {
    background: hsl(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
}

.badge-not_going {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

@media (max-width: 768px) {
    .ed-hero { min-height: 200px; }
    .ed-hero-title { font-size: 1.25rem; }
    .ed-info-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Admin table rows ─────────────────────────────────── */
.admin-row {
    cursor: pointer;
    transition: background 0.12s;
}

.admin-row:hover {
    background: hsl(var(--muted));
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    .event-form-hero {
        grid-template-columns: 1fr;
    }
    .img-upload {
        aspect-ratio: 16/9;
        max-height: 200px;
    }
}

/* ── Flatpickr brand overrides ───────────────────────── */
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--primea-orange);
    border-color: var(--primea-orange);
}
.flatpickr-day.today {
    border-color: var(--primea-orange);
}
.flatpickr-day.today:hover {
    background: var(--primea-orange);
    border-color: var(--primea-orange);
    color: #fff;
}

/* ── Purchase Budget Admin ────────────────────────────── */
.pb-remaining-positive {
    color: #16a34a;
    font-weight: 600;
}
.pb-remaining-negative {
    color: #dc2626;
    font-weight: 600;
}
.pb-card-toggle {
    cursor: pointer;
    border-radius: 0.5rem;
    margin: -0.55rem;
    padding: 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    transition: background 0.15s;
}
.pb-card-toggle:hover {
    background: hsl(var(--muted) / 0.15);
}
.pb-expand-btn {
    margin-left: auto;
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
}
.pb-budget-detail {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}
.pb-meta-sep {
    margin: 0 0.25rem;
}
.pb-detail {
    border-top: 1px dashed var(--primea-grey-border);
    padding-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.pb-detail-section {
    display: flex;
    flex-direction: column;
    border-top: 1px dashed var(--primea-grey-border);
    padding-top: 0.75rem;
    gap: 0.5rem;
}
.pb-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.pb-detail-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}
.pb-detail-search {
    max-width: 220px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}
.pb-entries-table {
    font-size: 0.8rem;
}
.pb-entries-table th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: hsl(var(--muted-foreground));
}
.pb-detail-pagination {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
    font-size: 0.75rem;
}
.pb-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--primea-grey-border);
    border-radius: 0.375rem;
    color: hsl(var(--muted-foreground));
    transition: background 0.15s;
}
.pb-page-btn:hover {
    background: hsl(var(--muted) / 0.3);
}
.pb-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0.2rem;
    border-radius: 0.25rem;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s, color 0.15s;
}
.pb-action-btn:hover {
    opacity: 1;
    color: hsl(var(--foreground));
}
.pb-action-btn-danger:hover {
    color: hsl(var(--destructive, 0 84% 60%));
}
.pb-edit-dialog {
    max-width: 400px;
    border-radius: 0.75rem;
}
.pb-detail-forms {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.pb-inline-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.pb-form-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.pb-form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    min-width: 5rem;
}
.pb-pill-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.pb-pill-desc {
    font-size: 0.7rem;
    color: hsl(var(--muted-foreground));
    font-style: italic;
}
.pb-pill-group {
    display: inline-flex;
    gap: 0;
    border: 1px solid var(--primea-grey-border);
    border-radius: 0.375rem;
    overflow: hidden;
}
.pb-pill {
    cursor: pointer;
    margin: 0;
}
.pb-pill input { display: none; }
.pb-pill span {
    display: block;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    transition: background 0.15s, color 0.15s;
}
.pb-pill + .pb-pill span {
    border-left: 1px solid var(--primea-grey-border);
}
.pb-pill input:checked + span {
    background: var(--primea-orange);
    color: #fff;
    border-left-color: transparent;
}
.pb-pill:has(input:checked) + .pb-pill span {
    border-left-color: transparent;
}
.pb-form-input {
    width: 9rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}
.pb-form-input-wide {
    width: 10rem;
}
@media (max-width: 640px) {
    .pb-form-row { flex-direction: column; align-items: stretch; }
    .pb-form-input, .pb-form-input-wide { width: 100%; }
    .pb-detail-search { max-width: 100%; }
}

/* ── User search dropdown ────────────────────────────── */
.user-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: hsl(var(--card));
    border: 1px solid var(--primea-grey-border);
    border-radius: 0.5rem;
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.user-search-dropdown:empty {
    display: none;
}
.user-search-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
}
.user-search-option:hover,
.user-search-option.active {
    background: hsl(var(--accent));
}
.or-hide-btn {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    display: flex;
    border-radius: 4px;
    transition: background 0.15s;
}
.or-hide-btn:hover {
    background: hsl(var(--destructive) / 0.15);
    color: hsl(var(--destructive));
}

/* ── City search selected state ────────────────────── */
.city-selected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: hsl(var(--accent));
    border-radius: 0.5rem;
}
.city-selected-info {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

.rule-exclusions-panel {
    padding: 0.25rem 0;
}
.rule-exclusions-panel .uk-badge {
    pointer-events: auto;
}

/* ── Hackaway map page ──────────────────────────────── */
.hackaway-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1rem;
}
.hackaway-grid-2col {
    grid-template-columns: 280px 1fr;
    grid-template-rows: calc(100vh - 220px);
    margin-top: 1rem;
    position: relative;
    z-index: 0;
}
.hackaway-pin-list {
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.hackaway-pin-list .uk-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: hsl(var(--card));
    border: 1px solid var(--primea-grey-border);
}
@media (max-width: 900px) {
    .hackaway-grid-2col {
        grid-template-columns: 1fr;
        grid-template-rows: 400px auto;
    }
    #hackaway-map {
        order: -1;
    }
}
@media (max-width: 900px) {
    .hackaway-grid {
        grid-template-columns: 1fr;
    }
}
.hackaway-pin-icon {
    background: none !important;
    border: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hackaway-locate-btn a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 16px;
    text-decoration: none;
    background: #fff;
}
.hackaway-leaderboard .uk-card {
    background: hsl(var(--card));
    border: 1px solid var(--primea-grey-border);
}
.hackaway-lb-list {
    list-style: none;
    counter-reset: lb-rank;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.hackaway-lb-row {
    counter-increment: lb-rank;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.hackaway-lb-row::before {
    content: counter(lb-rank);
    min-width: 1.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
}
.hackaway-lb-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.hackaway-lb-avatar-placeholder,
.hackaway-lb-avatar.avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primea-orange);
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
}
.hackaway-lb-info {
    flex: 1;
    min-width: 0;
}
.hackaway-lb-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hackaway-lb-bar-wrap {
    height: 4px;
    background: hsl(var(--accent));
    border-radius: 2px;
    margin-top: 0.2rem;
}
.hackaway-lb-bar {
    height: 100%;
    background: var(--primea-orange);
    border-radius: 2px;
    min-width: 2px;
}
.hackaway-lb-count {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
}

/* ── Pin feed list ────────────────────────────────── */
.hackaway-feed-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.hackaway-feed-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.hackaway-feed-item:hover {
    background: hsl(var(--accent));
}
.hackaway-feed-emoji {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}
.hackaway-feed-info {
    flex: 1;
    min-width: 0;
}
.hackaway-feed-title {
    font-size: 0.85rem;
    font-weight: 500;
}
.hackaway-feed-meta {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hackaway-feed-stale {
    opacity: 0.5;
    cursor: default;
}
.hackaway-feed-stale:hover {
    background: transparent;
}
.hackaway-feed-delete {
    background: none;
    border: none;
    color: hsl(var(--muted-foreground));
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    flex-shrink: 0;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.hackaway-feed-delete:hover {
    color: hsl(var(--destructive));
    background: hsl(var(--destructive) / 0.1);
}
.hackaway-feed-empty {
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
    padding: 0.5rem;
}

/* ── Pin picker popup ─────────────────────────────── */
.pin-picker {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.pin-picker-buttons {
    display: flex;
    gap: 0.25rem;
}
.pin-picker-title {
    width: 100%;
    padding: 0.25rem 0.4rem;
    font-size: 0.8rem;
    border: 1px solid hsl(var(--border));
    border-radius: 6px;
    outline: none;
    box-sizing: border-box;
}
.pin-picker-title:focus {
    border-color: hsl(var(--ring));
}
.pin-picker button {
    background: none;
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s, transform 0.1s;
}
.pin-picker button:hover {
    background: hsl(var(--accent));
    transform: scale(1.15);
}
.pin-picker-perm {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    cursor: pointer;
}
.pin-picker-perm input {
    margin: 0;
    cursor: pointer;
}
.pin-delete-btn {
    background: none;
    border: 1px solid hsl(var(--destructive));
    color: hsl(var(--destructive));
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    margin-top: 0.25rem;
    transition: background 0.15s;
}
.pin-delete-btn:hover {
    background: hsl(var(--destructive));
    color: white;
}

/* Hide columns on mobile */
@media (max-width: 768px) {
    .entry-col-hide-mobile { display: none; }
}

/* ── Language switcher ────────────────────────────────── */
.lang-dropdown {
    position: relative;
}
.lang-dropdown-trigger {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.75rem;
    cursor: pointer;
    line-height: 1;
}
.lang-dropdown-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    padding: 0.25rem;
    min-width: 130px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 50;
}
.lang-dropdown.open .lang-dropdown-menu {
    display: block;
}
.lang-dropdown-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    background: none;
    border: none;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    color: hsl(var(--foreground));
    cursor: pointer;
    transition: background 0.15s;
}
.lang-dropdown-option:hover {
    background: hsl(var(--accent));
}
.lang-dropdown-option.active {
    color: var(--primea-orange);
    font-weight: 600;
}
.auth-lang {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}
.auth-lang .lang-dropdown-menu {
    bottom: auto;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: hsl(var(--card));
}

/* ── External links (ext-) ──────────────────────────── */
.ext-links-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ext-link-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--primea-grey-border);
    border-radius: 0.75rem;
    background: hsl(var(--card));
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ext-link-card:hover {
    border-color: var(--primea-orange);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ext-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: hsl(var(--muted));
    flex-shrink: 0;
}
.ext-link-icon i {
    width: 1.25rem;
    height: 1.25rem;
    color: hsl(var(--muted-foreground));
}
.ext-link-info {
    flex: 1;
    min-width: 0;
}
.ext-link-name {
    font-weight: 600;
    font-size: 0.95rem;
}
.ext-link-desc {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.15rem;
}
.ext-link-arrow {
    width: 1rem;
    height: 1rem;
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
}

/* ── Receipt entry rows (admin detail) ───────────────── */
.re-list {
    display: flex;
    flex-direction: column;
}
.re-row {
    border-bottom: 1px solid var(--primea-grey-border);
    padding: 0.6rem 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.re-row:last-child {
    border-bottom: none;
}
.re-row-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.re-row-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 180px;
    flex-shrink: 0;
}
.re-row-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.re-row-user-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.re-row-user-email {
    font-size: 0.7rem;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.re-row-title {
    flex: 1;
    min-width: 0;
}
.re-row-amount {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}
.re-row-qty {
    width: 50px;
    text-align: center;
}
.re-row-times {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
}
.re-row-kr {
    width: 80px;
    text-align: right;
}
.re-row-currency {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
    font-weight: 500;
}
.re-row-details {
    display: flex;
    gap: 0.5rem;
    padding-left: calc(180px + 0.5rem);
}
.re-row-url {
    width: 220px;
    flex-shrink: 0;
}
.re-row-desc {
    flex: 1;
    min-width: 0;
}
.re-row-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: calc(180px + 0.5rem);
}
.re-row-meta select {
    width: 130px;
}
.re-row-delete {
    background: none;
    border: none;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    padding: 0.25rem;
    margin-left: auto;
}
.re-row-delete:hover {
    color: hsl(var(--destructive));
}
.re-row-field {
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
    height: auto;
}

/* Receipt entry rows — mobile */
@media (max-width: 768px) {
    .re-row-user {
        width: 100%;
    }
    .re-row-main {
        flex-wrap: wrap;
    }
    .re-row-title {
        flex: 1 1 100%;
        order: 2;
    }
    .re-row-amount {
        order: 3;
    }
    .re-row-details,
    .re-row-meta {
        padding-left: 0;
        flex-wrap: wrap;
    }
    .re-row-url {
        width: 100%;
    }
    .re-row-meta select {
        flex: 1;
        min-width: 0;
    }
}

/* Office requests table column layout */
.entry-table-office .entry-table-header,
.entry-table-office .entry-row {
    grid-template-columns: 1fr 140px 100px 80px;
}
@media (max-width: 768px) {
    .entry-table-office .entry-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }
    .entry-table-office .entry-col-action { grid-column: 2; grid-row: 1; }
}

/* ── RSVP context menu ─────────────────────────────── */
.rsvp-ctx-menu {
    position: fixed;
    z-index: 9999;
    min-width: 180px;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 0.25rem 0;
    user-select: none;
    -webkit-user-select: none;
}
.rsvp-ctx-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    font-size: 0.85rem;
    color: hsl(var(--foreground));
    cursor: pointer;
    text-align: left;
}
.rsvp-ctx-item:hover {
    background: hsl(var(--accent));
}
.rsvp-ctx-item.active {
    color: var(--primea-orange);
    font-weight: 600;
}
.rsvp-ctx-item-cancel {
    color: hsl(var(--destructive));
}
.rsvp-ctx-item-cancel:hover {
    background: hsl(var(--destructive) / 0.1);
}
.rsvp-ctx-divider {
    height: 1px;
    background: hsl(var(--border));
    margin: 0.25rem 0;
}

/* ── Event Comments ────────────────────────────────── */
.ed-comments {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.ed-comment {
    padding: 0.75rem;
    border-radius: 8px;
    background: hsl(var(--muted) / 0.3);
}
.ed-comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.ed-comment-author {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: inherit;
}
.ed-comment-name {
    font-weight: 600;
    font-size: 0.85rem;
}
.ed-comment-date {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin-left: auto;
}
.ed-comment-delete {
    background: none;
    border: none;
    color: hsl(var(--muted-foreground));
    padding: 0.15rem;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}
.ed-comment:hover .ed-comment-delete {
    opacity: 1;
}
.ed-comment-delete:hover {
    color: hsl(var(--destructive));
    background: hsl(var(--destructive) / 0.1);
}
.ed-comment-text {
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
}
.ed-comment-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    margin-top: 0.75rem;
}
.ed-comment-form textarea {
    flex: 1;
    resize: vertical;
    min-height: 2.5rem;
}

/* ── Event Polls ─────────────────────────────────────────────── */
.ed-polls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ed-poll {
    background: hsl(var(--muted) / 0.35);
    border-radius: 8px;
    padding: 0.75rem;
}
.ed-poll-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.ed-poll-question {
    font-weight: 600;
    font-size: 0.9rem;
}
.ed-poll-header-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.ed-poll-copy-link {
    background: none;
    border: none;
    padding: 0.2rem;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    border-radius: 4px;
    display: flex;
    align-items: center;
}
.ed-poll-copy-link:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--muted));
}
.ed-poll-delete-btn:hover {
    color: hsl(var(--destructive));
    background: hsl(var(--destructive) / 0.1);
}
.ed-poll-meta {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}
.ed-poll-meta .uk-badge {
    font-size: 0.7rem;
}
.badge-info {
    background: hsl(var(--primary) / 0.15);
    color: hsl(var(--primary));
}
.badge-muted {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}
.ed-poll-options {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.ed-poll-option {
    position: relative;
    border-radius: 6px;
    padding: 0.45rem 0.6rem;
    cursor: pointer;
    border: 1.5px solid transparent;
    background: hsl(var(--background));
    transition: border-color 0.15s, background 0.15s;
    overflow: hidden;
}
.ed-poll-option:hover {
    border-color: hsl(var(--border));
}
.ed-poll-option-voted {
    border-color: var(--primea-orange);
}
.ed-poll-option-bar {
    position: absolute;
    inset: 0;
    background: var(--primea-orange);
    opacity: 0.08;
    transition: width 0.3s ease;
    border-radius: 6px;
    pointer-events: none;
}
.ed-poll-option-voted .ed-poll-option-bar {
    opacity: 0.15;
}
.ed-poll-option-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    z-index: 1;
}
.ed-poll-option-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 500;
}
.ed-poll-option-voted .ed-poll-option-label {
    color: var(--primea-orange);
}
.ed-poll-option-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}
.ed-poll-option-count {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
}
.ed-poll-option-delete {
    background: none;
    border: none;
    color: hsl(var(--muted-foreground));
    padding: 0.15rem;
    border-radius: 4px;
    cursor: pointer;
    z-index: 2;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.ed-poll-option-delete:hover {
    color: hsl(var(--destructive));
    background: hsl(var(--destructive) / 0.1);
}
.ed-poll-voters {
    display: flex;
    gap: 0.2rem;
    padding: 0.15rem 0.3rem 0.3rem;
    flex-wrap: wrap;
}
.ed-poll-voters .avatar-xs {
    width: 20px;
    height: 20px;
    font-size: 0.55rem;
}
.ed-poll-add-option {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    margin-top: 0.5rem;
}
.ed-poll-add-option .uk-input {
    flex: 1;
}
.ed-slack-modal {
    border: none;
    border-radius: 12px;
    padding: 0;
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 90vw;
    inset: 0;
    margin: auto;
}
.ed-slack-modal::backdrop {
    background: rgba(0,0,0,0.4);
}
.ed-slack-modal-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ed-slack-modal-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}
.ed-slack-modal-question {
    margin: 0;
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
}
.ed-slack-modal-content form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ed-slack-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
/* Archived polls */
details.ed-poll-archived {
    opacity: 0.7;
}
details.ed-poll-archived[open] {
    opacity: 1;
}
details.ed-poll-archived > summary {
    cursor: pointer;
    list-style: none;
}
details.ed-poll-archived > summary::-webkit-details-marker {
    display: none;
}
details.ed-poll-archived > summary::marker {
    display: none;
    content: "";
}
.ed-poll-chevron {
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
    transition: transform 0.2s;
}
details.ed-poll-archived[open] > summary .ed-poll-chevron {
    transform: rotate(180deg);
}
.ed-poll-body {
    padding-top: 0.5rem;
}

.ed-poll-add-form {
    margin-top: 0.75rem;
}
.ed-poll-add-form > summary {
    cursor: pointer;
}
.ed-poll-form-inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.75rem;
    border: 1.5px dashed hsl(var(--border));
    border-radius: 8px;
}
.ed-poll-form-checks {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.ed-poll-form-checks label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
}
.ed-poll-form-options {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* Dashboard comment count */
.db-ev-comments {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

/* Unanswered poll badge */
.entry-col-poll-badge,
.db-ev-poll-badge {
    color: var(--primea-orange);
    display: flex;
    align-items: center;
    cursor: pointer;
    animation: poll-pulse 2s ease-in-out infinite;
}
@keyframes poll-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
