/* ========================================
   Core Layout & Navigation
   ======================================== */
.layout-shell {
    display: flex;
    min-height: calc(100vh - 56px);
}

.sidebar-panel {
    width: 260px;
    background-color: #f8fafc;
    border-right: 1px solid #e5e7eb;
    padding: 1.25rem 1rem;
}

.topbar {
    height: 56px;
    background: #0d6efd;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

.topbar .brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.content-wrap {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-inner {
    padding: 1.25rem;
}

/* Navigation Styles */
.nav-pills .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.75rem;
    padding: 0.6rem 0.8rem;
    color: #0f172a;
}

.nav-pills .nav-link.active {
    background: #0d6efd;
    color: #fff;
}

.sidebar-sep {
    border-top: 1px solid #e5e7eb;
    margin: 1rem 0;
}

/* ========================================
   Dashboard Styles
   ======================================== */
.dash-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    background: var(--bs-body-bg);
}

.dash-kpi {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.1;
}

.dash-sub {
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

.dash-table td,
.dash-table th {
    vertical-align: middle;
}

.badge-soft {
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

.truncate {
    max-width: 420px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   RSVP Status Card Grouping
   ======================================== */
.rsvp-group-start {
    border-top: 2px solid var(--bs-border-color);
}

.rsvp-group-start > td {
    padding-top: 0.75rem;
}

/* ========================================
   Bottom Navigation Bar
   ======================================== */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background-color: #0d6efd;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1030;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav .nav-item {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: #fff;
    font-size: 12px;
    padding-top: 4px;
}

.bottom-nav .nav-item i {
    display: block;
    font-size: 20px;
    line-height: 1;
}

.bottom-nav .active {
    color: #ffc107;
}

/* ========================================
   Mobile Responsive Overrides
   ======================================== */
@media (max-width: 767.98px) {
    /* Touch-friendly control heights */
    .btn,
    .form-control,
    .form-select,
    .input-group-text {
        min-height: 44px;
    }

    /* Account for fixed bottom nav */
    main,
    .main-content,
    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }

    /* Stack date/time controls on mobile */
    .ib-when .input-group-text {
        width: 100%;
        border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
    }

    .ib-when .ib-date,
    .ib-when .ib-time,
    .ib-when .ib-select {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .ib-when .input-group > .form-control,
    .ib-when .input-group > .form-select {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }
}

@media (max-width: 576px) {
    .truncate {
        max-width: 220px;
    }
}





/* AddEditEvent.razor.css */

/* Desktop: keep "When" input-groups neat and not full-stretch */
.ib-when .ib-group {
    max-width: 720px;
}

.ib-when .input-group-text {
    min-width: 110px;
    white-space: nowrap;
}

/* Force sensible widths for date/time so they don't expand */
.ib-when .ib-date.form-control {
    width: 200px;
    max-width: 200px;
    flex: 0 0 200px !important;
}

.ib-when .ib-time.form-control {
    width: 140px;
    max-width: 140px;
    flex: 0 0 140px !important;
}

/* Time zone select: cap width so it doesn't become a runway */
.ib-when .ib-select.form-select {
    width: 520px;
    max-width: 520px;
    flex: 0 1 520px !important;
}

/* Mobile: stack label then controls full-width */
@media (max-width: 576px) {
    .ib-when .ib-group {
        max-width: 100%;
    }

    .ib-when .input-group {
        flex-wrap: wrap;
    }

    .ib-when .input-group-text {
        width: 100%;
        min-width: 100%;
        border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
    }

    .ib-when .ib-date.form-control,
    .ib-when .ib-time.form-control,
    .ib-when .ib-select.form-select {
        width: 100%;
        max-width: 100%;
        flex: 1 1 100% !important;
    }

    /* When stacked, make the first control connect to the label nicely */
    .ib-when .input-group > .form-control,
    .ib-when .input-group > .form-select {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }
}


/* Dashboard.razor.css */

.ib-kpi {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.ib-event-item {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

/* Larger title, keep it tidy */
.ib-event-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
}

/* Keep meta rows consistent */
.ib-event-row {
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Truncation helper */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.min-w-0 {
    min-width: 0;
}

/* On small screens, let location/RSVP wrap if needed */
@media (max-width: 576px) {
    .ib-event-row .truncate {
        white-space: normal;
    }
}


/* single subtle separator between RSVP groups */
.rsvp-group-start td {
    border-top: 4px solid rgba(0,0,0,.25) !important;
}