:root {
    --cn-primary: #2563eb;
    --cn-primary-hover: #1d4ed8;
    --cn-bg: #f8fafc;
    --cn-card: #ffffff;
    --cn-border: #e2e8f0;
    --cn-text: #1e293b;
    --cn-muted: #64748b;
    --cn-success: #16a34a;
    --cn-radius: 12px;
}

.cn-wrap {
    max-width: 760px;
    margin: 30px auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--cn-text);
    line-height: 1.5;
}

/* ── Tabs ───────────────────────────────────────────────── */
.cn-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--cn-border);
    margin-bottom: 0;
}
.cn-tab {
    padding: 12px 24px;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--cn-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    position: relative;
}
.cn-tab:hover { color: var(--cn-text); }
.cn-tab-active {
    color: var(--cn-primary);
    border-bottom-color: var(--cn-primary);
}
.cn-badge {
    position: absolute;
    top: 6px; right: 4px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 14px;
    text-align: center;
}

/* ── Panels ─────────────────────────────────────────────── */
.cn-panel { display: none; }
.cn-panel-active { display: block; }

/* ── Search ─────────────────────────────────────────────── */
.cn-search-bar {
    padding: 16px 0;
}
.cn-search-bar input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--cn-border);
    border-radius: 10px;
    font-size: 15px;
    box-sizing: border-box;
    background: var(--cn-card);
    color: var(--cn-text);
    transition: border-color 0.2s;
}
.cn-search-bar input:focus {
    outline: none;
    border-color: var(--cn-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* ── Directory Cards ────────────────────────────────────── */
.cn-directory-list {
    min-height: 100px;
}
.cn-attendee-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--cn-card);
    border: 1px solid var(--cn-border);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: box-shadow 0.2s;
}
.cn-attendee-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.cn-attendee-info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.cn-attendee-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--cn-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}
.cn-attendee-name {
    font-weight: 600;
    font-size: 15px;
}
.cn-attendee-meta {
    font-size: 13px;
    color: var(--cn-muted);
}

/* ── Buttons ────────────────────────────────────────────── */
.cn-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--cn-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.cn-btn:hover { background: var(--cn-primary-hover); }
.cn-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.cn-btn-sm { padding: 7px 16px; font-size: 13px; }
.cn-btn-outline {
    background: transparent;
    color: var(--cn-primary);
    border: 1px solid var(--cn-primary);
}
.cn-btn-outline:hover { background: var(--cn-primary); color: #fff; }

/* ── Status Pills ───────────────────────────────────────── */
.cn-status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.cn-pill-pending  { background: #fff3cd; color: #856404; }
.cn-pill-accepted { background: #d4edda; color: #155724; }
.cn-pill-accepted a { color: #155724; }
.cn-pill-declined { background: #f8d7da; color: #721c24; }
.cn-pill-cancelled{ background: #e2e3e5; color: #383d41; }

/* ── Meetings ───────────────────────────────────────────── */
.cn-meetings-section {
    margin-top: 20px;
}
.cn-meetings-section h3 {
    font-size: 16px;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--cn-border);
}
.cn-meeting-card {
    background: var(--cn-card);
    border: 1px solid var(--cn-border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 10px;
    transition: box-shadow 0.2s;
}
.cn-meeting-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.cn-mc-accepted { border-left: 4px solid var(--cn-success); }
.cn-mc-pending  { border-left: 4px solid #f59e0b; }
.cn-mc-declined { border-left: 4px solid #dc2626; opacity: 0.7; }
.cn-mc-cancelled{ border-left: 4px solid #94a3b8; opacity: 0.6; }

.cn-meeting-who strong { font-size: 15px; }
.cn-meeting-msg {
    font-size: 13px;
    color: var(--cn-muted);
    margin: 8px 0;
    font-style: italic;
}
.cn-meeting-resp { font-style: normal; color: var(--cn-text); }
.cn-meeting-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.cn-meeting-date {
    font-size: 12px;
    color: var(--cn-muted);
}
.cn-meeting-btns {
    display: flex;
    gap: 8px;
}

/* ── Modal ──────────────────────────────────────────────── */
.cn-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cn-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}
.cn-modal-box {
    position: relative;
    background: var(--cn-card);
    border-radius: 14px;
    padding: 28px;
    width: 90%;
    max-width: 460px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    z-index: 1;
}
.cn-modal-box h3 { margin: 0 0 4px; }
.cn-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}
.cn-field { margin: 14px 0; }
.cn-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}
.cn-field textarea, .cn-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--cn-border);
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
    resize: vertical;
}
.cn-field textarea:focus, .cn-field input:focus {
    outline: none;
    border-color: var(--cn-primary);
}

.cn-error {
    margin-top: 10px;
    padding: 10px 14px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 13px;
}

/* ── Misc ───────────────────────────────────────────────── */
.cn-muted { color: var(--cn-muted); }
.cn-center { text-align: center; }
.cn-card {
    background: var(--cn-card);
    border: 1px solid var(--cn-border);
    border-radius: var(--cn-radius);
    padding: 32px;
}

.cn-loading { text-align: center; padding: 30px; }
.cn-spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--cn-border);
    border-top-color: var(--cn-primary);
    border-radius: 50%;
    animation: cn-spin 0.6s linear infinite;
    margin: 0 auto;
}
@keyframes cn-spin { to { transform: rotate(360deg); } }

@media (max-width: 500px) {
    .cn-attendee-card { flex-direction: column; align-items: flex-start; gap: 10px; }
    .cn-attendee-action { align-self: flex-end; }
    .cn-meeting-bottom { flex-direction: column; align-items: flex-start; }
}
