.row-span-2 {
    grid-row: span 2 / span 2;
}

/* ══════════════════════════════════════════════════════════════════════════════
   COACH CHAT — nav item + page layout
   Matches the ExamBoot dark Filament theme exactly.
══════════════════════════════════════════════════════════════════════════════ */

/* ── 1. SIDEBAR NAV ITEM ─────────────────────────────────────────────────── */
/*
   Injected at panels::sidebar.nav.start — appears above all other nav items.
   Design: circular avatar (green ring) + "Talk to your coach" label.
   Matches image 1 exactly: same padding/font as Filament nav items.
*/
.cc-nav-wrap {
    padding: 0.5rem 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 0.25rem;
}
.cc-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.cc-nav-item:hover,
.cc-nav-item--active {
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
}
.cc-nav-item--active .cc-nav-avatar-ring {
    border-color: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2);
}

/* Circular avatar ring — green border */
.cc-nav-avatar-ring {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2.5px solid #22c55e;
    padding: 2px;
    display: block;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.cc-nav-item:hover .cc-nav-avatar-ring {
    border-color: #4ade80;
}
.cc-nav-avatar-img {
    width: 10%;
    height: 10%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Label — hidden when sidebar is collapsed */
.cc-nav-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s;
}
[data-sidebar-collapsed="true"] .cc-nav-label,
.fi-sidebar.fi-sidebar-collapsed .cc-nav-label {
    opacity: 0;
    width: 0;
    pointer-events: none;
}


/* ── 2. PAGE LAYOUT ──────────────────────────────────────────────────────── */
/*
   Two-column layout: sidebar (context) + main (chat).
   On mobile: stacked vertically.
*/
.cc-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.25rem;
    height: calc(100vh - 9rem);
    min-height: 500px;
}
@media (max-width: 768px) {
    .cc-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
}


/* ── 3. LEFT SIDEBAR — context panel ─────────────────────────────────────── */
.cc-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--fi-color-gray-900, #111827);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    overflow-y: auto;
}

/* Coach profile block */
.cc-coach-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.cc-coach-avatar-ring {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid #22c55e;
    padding: 3px;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
    margin-bottom: 0.25rem;
}
.cc-coach-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.cc-coach-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f1f5f9;
}
.cc-coach-cert {
    font-size: 0.75rem;
    color: #4ade80;
    text-align: center;
    word-break: break-word;
}

/* Sidebar sections */
.cc-sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.cc-sidebar-section--actions { gap: 0.35rem; }

.cc-sidebar-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    margin-bottom: 0.15rem;
}

/* Cert selector */
.cc-select {
    width: 100%;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}
.cc-select:focus { border-color: #22c55e; }

/* Metrics */
.cc-metric {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.45rem 0;
}
.cc-metric--warn .cc-metric-icon { color: #f87171; }
.cc-metric-icon { color: #4ade80; flex-shrink: 0; margin-top: 1px; }
.cc-metric-label { font-size: 0.68rem; color: #475569; text-transform: uppercase; letter-spacing: 0.04em; }
.cc-metric-value { font-size: 0.82rem; font-weight: 600; color: #e2e8f0; }
.cc-metric-value--sm { font-size: 0.76rem; }

/* Quick action buttons */
.cc-quick-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.45rem 0.65rem;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cc-quick-btn:hover {
    background: #273549;
    color: #e2e8f0;
    border-color: rgba(34, 197, 94, 0.3);
}

/* Clear button */
.cc-clear-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: none;
    color: #475569;
    font-size: 0.78rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: color 0.15s;
}
.cc-clear-btn:hover { color: #f87171; }


/* ── 4. CHAT AREA ────────────────────────────────────────────────────────── */
.cc-chat {
    display: flex;
    flex-direction: column;
    background: var(--fi-color-gray-900, #111827);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    min-height: 0;
}

/* Messages scroll area */
.cc-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    scroll-behavior: smooth;
}
.cc-messages::-webkit-scrollbar { width: 5px; }
.cc-messages::-webkit-scrollbar-track { background: transparent; }
.cc-messages::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 4px; }

/* Welcome screen */
.cc-welcome {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.5rem 0;
}
.cc-welcome-greeting {
    font-size: 1rem;
    font-weight: 600;
    color: #f1f5f9;
}
.cc-welcome-sub {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.65;
}
.cc-welcome-sub strong { color: #94a3b8; }

/* No credits banner */
.cc-no-credits-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.65rem 0.9rem;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 10px;
    color: #f87171;
    font-size: 0.82rem;
}
.cc-upgrade-link {
    margin-left: auto;
    color: #4ade80;
    font-weight: 600;
    text-decoration: none;
}
.cc-upgrade-link:hover { text-decoration: underline; }

/* Chat bubbles */
.cc-bubble {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-width: 85%;
}
.cc-bubble--user { align-self: flex-end; }
.cc-bubble--coach { align-self: flex-start; }

.cc-bubble-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 0.2rem;
}
.cc-bubble--user .cc-bubble-label  { color: #22c55e; text-align: right; }
.cc-bubble--coach .cc-bubble-label { color: #475569; }

.cc-bubble-text {
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.6;
    word-break: break-word;
}
.cc-bubble--user .cc-bubble-text {
    background: #1e3a5f;
    color: #e2e8f0;
    border-bottom-right-radius: 4px;
}
.cc-bubble--coach .cc-bubble-text {
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom-left-radius: 4px;
}

/* System info */
.cc-sysinfo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    align-self: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
}
.cc-sysinfo--ok {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #4ade80;
}
.cc-sysinfo--warn {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: #f87171;
}

/* No-credits info card (in chat history) */
.cc-nocredits-card {
    align-self: center;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: rgba(251, 191, 36, 0.07);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 12px;
    max-width: 90%;
}
.cc-nocredits-card-body {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fbbf24;
    font-size: 0.82rem;
}
.cc-nocredits-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    padding: 0.35rem 0.85rem;
    background: #22c55e;
    color: #052e16;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
}
.cc-nocredits-cta:hover { background: #16a34a; }

/* Typing animation */
.cc-typing {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.65rem 0.9rem;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    border-bottom-left-radius: 4px;
}
.cc-typing span {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    animation: ccTyping 1.3s ease-in-out infinite;
}
.cc-typing span:nth-child(2) { animation-delay: 0.2s; }
.cc-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ccTyping {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
    40%           { transform: scale(1);   opacity: 1; }
}


/* ── 5. CALENDAR PROPOSAL CARD ───────────────────────────────────────────── */
.cc-cal-card {
    margin: 0 1.25rem 0.75rem;
    background: #0f1729;
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}
.cc-cal-card-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    background: rgba(34, 197, 94, 0.07);
    border-bottom: 1px solid rgba(34, 197, 94, 0.12);
    font-size: 0.78rem;
    font-weight: 700;
    color: #4ade80;
}
.cc-cal-modules {
    padding: 0.3rem 0;
    max-height: 130px;
    overflow-y: auto;
}
.cc-cal-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.22rem 0.85rem;
    font-size: 0.77rem;
    color: #94a3b8;
}
.cc-cal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.cc-cal-dot--0 { background: #334155; }
.cc-cal-dot--1 { background: #3b82f6; }
.cc-cal-dot--2 { background: #22c55e; }
.cc-cal-name  { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-cal-dates { flex-shrink: 0; font-size: 0.71rem; color: #475569; }
.cc-cal-exam  {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.76rem;
    color: #475569;
}
.cc-cal-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}


/* ── 6. INPUT ROW ────────────────────────────────────────────────────────── */
.cc-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: #0f172a;
    flex-shrink: 0;
}
.cc-input {
    flex: 1;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}
.cc-input::placeholder { color: #334155; }
.cc-input:focus { border-color: rgba(34, 197, 94, 0.5); }
.cc-input:disabled { opacity: 0.35; cursor: not-allowed; }

.cc-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: #22c55e;
    border: none;
    border-radius: 10px;
    color: #052e16;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}
.cc-send-btn:hover { background: #16a34a; }
.cc-send-btn:disabled { opacity: 0.35; cursor: not-allowed; }


/* ── 7. EMPTY STATE (no portfolio) ───────────────────────────────────────── */
.cc-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem 2rem;
    text-align: center;
    min-height: 400px;
}
.cc-empty-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 3px solid #22c55e;
    padding: 3px;
    object-fit: cover;
}
.cc-empty-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f1f5f9;
}
.cc-empty-sub {
    font-size: 0.875rem;
    color: #475569;
    max-width: 320px;
    line-height: 1.65;
}
