/* ── Calendar page stack (breathing room between calendar and tasks) ── */
.fi-calendar-page-stack > * + * {
    margin-top: 1.75rem !important;
}

/* ── Team page ── */
.fi-team-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fi-team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.fi-team-row:first-child {
    border-top: 0;
    padding-top: 4px;
}

.dark .fi-team-row {
    border-top-color: rgba(255, 255, 255, 0.06);
}

.fi-team-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.fi-team-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.dark .fi-team-avatar {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.fi-team-identity {
    min-width: 0;
}

.fi-team-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark .fi-team-name {
    color: #f3f4f6;
}

.fi-team-email {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark .fi-team-email {
    color: #9ca3af;
}

.fi-team-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.fi-team-empty {
    padding: 24px 0;
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
}

/* ── Calendar wrapper card ── */
.fi-calendar-wrapper {
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.dark .fi-calendar-wrapper {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ── Event cards ── */
.ec-event {
    border-radius: 6px !important;
    border: 0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    font-weight: 500;
    font-size: 0.8125rem !important;
    line-height: 1.35 !important;
    padding: 3px 6px !important;
    cursor: pointer;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden !important;
}

.ec-event-title,
.ec-event-time {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.ec-event:hover {
    filter: brightness(1.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* ── Today highlight ── */
.ec-today {
    background: color-mix(in srgb, #3b82f6 8%, transparent) !important;
}

/* ── Day / time headers ── */
.ec-day-head,
.ec-time-head-cell {
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #6b7280;
}

/* ── Time axis labels ── */
.ec-time {
    font-size: 0.7rem !important;
    color: #9ca3af !important;
}

/* ── Softer grid lines ── */
.ec-line {
    border-color: rgba(0, 0, 0, 0.06) !important;
}

/* ── Now indicator ── */
.ec-now-indicator {
    border-color: #ef4444 !important;
    border-width: 1px !important;
    border-top-width: 2px !important;
    z-index: 5 !important;
    pointer-events: none;
}

.ec-now-indicator::before {
    content: '';
    position: absolute;
    left: -5px;
    top: -5px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    z-index: 6;
}

/* ── Calendar navigation buttons ── */
.ec-button {
    border-radius: 6px !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    padding: 4px 10px !important;
    transition: background 0.15s ease !important;
}

.ec-button:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.05) !important;
}

.ec-button:disabled {
    opacity: 0.4 !important;
}

/* ── Calendar title (date range) ── */
.ec-title {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
}

/* ── All-day section ── */
.ec-all-day {
    min-height: 28px;
}

/* ═══════════════════════════════
   Dark mode overrides
   ═══════════════════════════════ */

.dark .ec,
.dark .ec-body,
.dark .ec-days,
.dark .ec-day,
.dark .ec-content,
.dark .ec-sidebar,
.dark .ec-header,
.dark .ec-all-day,
.dark .ec-time,
.dark .ec-time-grid,
.dark .ec-col-head {
    background-color: #111827 !important;
    color: #e5e7eb !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* vkurko draws hour/half-hour separator lines via linear-gradient backgrounds.
   In dark mode those white gradients show as diagonal stripes — replace with subtle dark lines. */
.dark .ec-day,
.dark .ec-sidebar {
    background-image:
        linear-gradient(to top, rgba(255, 255, 255, 0.06) 1px, rgba(0, 0, 0, 0) 1px),
        linear-gradient(to top, rgba(255, 255, 255, 0.03) 1px, rgba(0, 0, 0, 0) 1px) !important;
}

.dark .ec-time,
.dark .ec-day-head,
.dark .ec-time-head-cell {
    color: #9ca3af !important;
}

.dark .ec-title {
    color: #e5e7eb !important;
}

.dark .ec-today {
    background: color-mix(in srgb, #3b82f6 15%, transparent) !important;
}

.dark .ec-line {
    border-color: rgba(255, 255, 255, 0.06) !important;
}

.dark .ec-button {
    background-color: #1f2937 !important;
    color: #e5e7eb !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.dark .ec-button:hover:not(:disabled) {
    background-color: #374151 !important;
}

.dark .ec-now-indicator {
    border-color: #f87171 !important;
}

.dark .ec-now-indicator::before {
    background: #f87171;
}
