/* ==========================================================================
   committees-member.css — Member Portal Committee Workspace (Phase 2)
   Token-pure, no raw hex/colors, 44px min targets, 16px inputs, D21 focus.
   ========================================================================== */

#tab-committees {
    padding: var(--oecta-space-lg) var(--oecta-space-md) var(--oecta-space-3xl);
    max-width: 1040px;
    margin: 0 auto;
    font-family: var(--oecta-font-body);
    color: var(--oecta-on-surface);
}

.cm-container {
    display: flex;
    flex-direction: column;
    gap: var(--oecta-space-xl);
}

/* ── Committee Header / Hero Banner ────────────────────────────────────── */
.cm-hero {
    background: var(--oecta-surface-lowest);
    border-radius: var(--oecta-radius-xl);
    padding: var(--oecta-space-xl);
    box-shadow: var(--portal-shadow);
    display: flex;
    flex-direction: column;
    gap: var(--oecta-space-md);
    position: relative;
    overflow: hidden;
}

.cm-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--oecta-primary-container);
}

.cm-hero-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--oecta-space-md);
}

.cm-hero-title-group {
    display: flex;
    align-items: center;
    gap: var(--oecta-space-md);
    flex-wrap: wrap;
}

.cm-hero-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--oecta-radius-lg);
    background: var(--oecta-surface-low);
    color: var(--oecta-primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.cm-hero-title {
    margin: 0;
    font-family: var(--oecta-font-display);
    font-size: var(--oecta-text-xl);
    font-weight: var(--oecta-weight-bold);
    color: var(--oecta-primary-container);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.cm-hero-badges {
    display: flex;
    align-items: center;
    gap: var(--oecta-space-xs);
    flex-wrap: wrap;
}

.cm-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--oecta-space-xs);
    padding: var(--oecta-space-xs) var(--oecta-space-sm);
    border-radius: 999px;
    font-size: var(--oecta-text-xs);
    font-weight: var(--oecta-weight-semibold);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cm-badge--active {
    background: var(--oecta-success-soft);
    color: var(--oecta-success-text);
}

.cm-badge--chair {
    background: var(--oecta-warning-soft);
    color: var(--oecta-warning);
}

.cm-badge--member {
    background: var(--oecta-surface-container);
    color: var(--oecta-on-surface-variant);
}

.cm-hero-desc {
    margin: 0;
    font-size: var(--oecta-text-base);
    line-height: 1.5;
    color: var(--oecta-on-surface-variant);
    max-width: 720px;
}

/* ── Committee Switcher Pills ──────────────────────────────────────────── */
.cm-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: var(--oecta-space-sm);
    padding-top: var(--oecta-space-xs);
}

.cm-switcher-pill {
    min-height: 44px;
    padding: var(--oecta-space-sm) var(--oecta-space-lg);
    border: none;
    border-radius: var(--oecta-radius-lg);
    background: var(--oecta-surface-low);
    color: var(--oecta-on-surface-variant);
    font-family: var(--oecta-font-body);
    font-size: var(--oecta-text-sm);
    font-weight: var(--oecta-weight-medium);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--oecta-space-xs);
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.cm-switcher-pill:hover {
    background: var(--oecta-surface-container);
    color: var(--oecta-primary-container);
}

.cm-switcher-pill.active {
    background: var(--oecta-primary-container);
    color: var(--oecta-on-primary-container);
    font-weight: var(--oecta-weight-semibold);
}

.cm-switcher-pill:focus-visible {
    outline: 2px solid var(--oecta-primary-container);
    outline-offset: 2px;
}

/* ── Honest-empty Notice Banner ────────────────────────────────────────── */
.cm-notice {
    background: var(--oecta-warning-soft);
    color: var(--oecta-on-surface);
    border-radius: var(--oecta-radius-lg);
    padding: var(--oecta-space-md) var(--oecta-space-lg);
    font-size: var(--oecta-text-base);
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: var(--oecta-space-md);
    box-shadow: inset 4px 0 0 var(--oecta-accent);
}

.cm-notice-icon {
    color: var(--oecta-warning);
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.cm-notice-text {
    flex: 1;
}

/* ── Section Structure ─────────────────────────────────────────────────── */
.cm-section {
    display: flex;
    flex-direction: column;
    gap: var(--oecta-space-md);
}

.cm-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--oecta-space-md);
}

.cm-section-title {
    margin: 0;
    font-family: var(--oecta-font-display);
    font-size: var(--oecta-text-lg);
    font-weight: var(--oecta-weight-bold);
    color: var(--oecta-primary-container);
}

.cm-section-sub {
    font-size: var(--oecta-text-xs);
    font-weight: var(--oecta-weight-medium);
    color: var(--oecta-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Action Capability Tiles ───────────────────────────────────────────── */
.cm-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--oecta-space-md);
}

.cm-tile {
    background: var(--oecta-surface-lowest);
    border-radius: var(--oecta-radius-lg);
    padding: var(--oecta-space-lg);
    box-shadow: var(--portal-shadow);
    border: none;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: var(--oecta-space-xs);
    min-height: 44px;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cm-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--portal-shadow-hover);
}

.cm-tile:focus-visible {
    outline: 2px solid var(--oecta-primary-container);
    outline-offset: 2px;
}

.cm-tile-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--oecta-radius-md);
    background: var(--oecta-surface-low);
    color: var(--oecta-primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: var(--oecta-space-xs);
}

.cm-tile-name {
    font-family: var(--oecta-font-display);
    font-size: var(--oecta-text-md);
    font-weight: var(--oecta-weight-bold);
    color: var(--oecta-primary-container);
    line-height: 1.2;
}

.cm-tile-desc {
    font-size: var(--oecta-text-xs);
    color: var(--oecta-text-muted);
    line-height: 1.4;
    margin: 0;
}

.cm-tile-badge {
    margin-top: auto;
    padding-top: var(--oecta-space-xs);
    font-size: var(--oecta-text-xs);
    font-weight: var(--oecta-weight-semibold);
    color: var(--oecta-warning);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Leadership & Roster Cards ─────────────────────────────────────────── */
.cm-two-col {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: var(--oecta-space-lg);
}

@media (max-width: 768px) {
    .cm-two-col {
        grid-template-columns: 1fr;
    }
}

.cm-card {
    background: var(--oecta-surface-lowest);
    border-radius: var(--oecta-radius-xl);
    padding: var(--oecta-space-lg);
    box-shadow: var(--portal-shadow);
    display: flex;
    flex-direction: column;
    gap: var(--oecta-space-md);
}

.cm-leader-item {
    display: flex;
    align-items: center;
    gap: var(--oecta-space-md);
    padding: var(--oecta-space-sm) 0;
}

.cm-leader-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--oecta-surface-low);
    color: var(--oecta-primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--oecta-weight-bold);
    font-size: var(--oecta-text-sm);
    flex-shrink: 0;
}

.cm-leader-info {
    flex: 1;
    min-width: 0;
}

.cm-leader-role {
    font-size: var(--oecta-text-xs);
    font-weight: var(--oecta-weight-semibold);
    color: var(--oecta-warning);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cm-leader-name {
    font-weight: var(--oecta-weight-bold);
    color: var(--oecta-on-surface);
    font-size: var(--oecta-text-base);
}

.cm-leader-email {
    font-size: var(--oecta-text-xs);
    color: var(--oecta-text-muted);
    text-decoration: none;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.cm-leader-email:hover {
    text-decoration: underline;
    color: var(--oecta-primary-container);
}

/* ── Member Roster Table/List ──────────────────────────────────── */
.cm-roster-list {
    display: flex;
    flex-direction: column;
    gap: var(--oecta-space-xs);
    max-height: 380px;
    overflow-y: auto;
}

.cm-roster-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--oecta-space-md);
    padding: var(--oecta-space-sm) var(--oecta-space-md);
    border-radius: var(--oecta-radius-md);
    background: var(--oecta-surface-low);
}

.cm-roster-name {
    font-size: var(--oecta-text-sm);
    font-weight: var(--oecta-weight-semibold);
    color: var(--oecta-on-surface);
}

.cm-roster-meta {
    font-size: var(--oecta-text-xs);
    color: var(--oecta-text-muted);
}

/* ── Committee Events ──────────────────────────────────────────────────── */
.cm-events-list {
    display: flex;
    flex-direction: column;
    gap: var(--oecta-space-md);
}

.cm-event-card {
    background: var(--oecta-surface-lowest);
    border-radius: var(--oecta-radius-lg);
    padding: var(--oecta-space-lg);
    box-shadow: var(--portal-shadow);
    display: flex;
    flex-direction: column;
    gap: var(--oecta-space-sm);
}

.cm-event-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--oecta-space-md);
}

.cm-event-info {
    flex: 1;
    min-width: 0;
}

.cm-event-title {
    margin: 0;
    font-family: var(--oecta-font-display);
    font-size: var(--oecta-text-base);
    font-weight: var(--oecta-weight-bold);
    color: var(--oecta-primary-container);
}

.cm-event-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--oecta-space-sm);
    font-size: var(--oecta-text-xs);
    color: var(--oecta-text-muted);
    margin-top: var(--oecta-space-xs);
}

.cm-event-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.cm-event-actions {
    display: flex;
    align-items: center;
    gap: var(--oecta-space-sm);
    flex-wrap: wrap;
    padding-top: var(--oecta-space-xs);
}

.cm-btn {
    min-height: 44px;
    padding: 0 var(--oecta-space-lg);
    border-radius: var(--oecta-radius-md);
    font-family: var(--oecta-font-body);
    font-size: var(--oecta-text-sm);
    font-weight: var(--oecta-weight-semibold);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--oecta-space-xs);
    text-decoration: none;
    transition: background 0.15s ease, transform 0.1s ease;
}

.cm-btn:focus-visible {
    outline: 2px solid var(--oecta-primary-container);
    outline-offset: 2px;
}

.cm-btn--primary {
    background: var(--oecta-primary-container);
    color: var(--oecta-on-primary-container);
}

.cm-btn--primary:hover {
    background: var(--oecta-primary-hover);
}

.cm-btn--ghost {
    background: var(--oecta-surface-low);
    color: var(--oecta-primary-container);
}

.cm-btn--ghost:hover {
    background: var(--oecta-surface-container);
}

/* ── Empty State ───────────────────────────────────────────────────────── */
.cm-empty-state {
    text-align: center;
    padding: var(--oecta-space-3xl) var(--oecta-space-xl);
    background: var(--oecta-surface-lowest);
    border-radius: var(--oecta-radius-xl);
    box-shadow: var(--portal-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--oecta-space-sm);
}

.cm-empty-icon {
    font-size: 40px;
    color: var(--oecta-text-muted);
}

.cm-empty-title {
    margin: 0;
    font-family: var(--oecta-font-display);
    font-size: var(--oecta-text-lg);
    font-weight: var(--oecta-weight-bold);
    color: var(--oecta-primary-container);
}

.cm-empty-desc {
    margin: 0;
    font-size: var(--oecta-text-base);
    color: var(--oecta-text-muted);
    max-width: 440px;
    line-height: 1.5;
}
