/* ================================================
   CASEBUDDY PLATFORM - Design System
   Navy + Gold branding from Maths Drills
   ================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #0E2535;
    --primary-mid: #1E4A68;
    --accent: #C9A84C;
    --accent-dark: #A8882E;
    --success: #1A7A3A;
    --danger: #C41E24;
    --warning: #C9A84C;
    --bg: #EEF1F5;
    --card: #ffffff;
    --text: #0E2535;
    --text-light: #5A6B7B;
    --border: #D4DAE3;
    --border-light: #E8ECF2;
    --radius: 4px;
    --radius-md: 8px;
    --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow: 0 1px 4px rgba(5,28,44,0.06);
    --shadow-lg: 0 4px 16px rgba(5,28,44,0.10);
}

/* ── DARK MODE ──────────────────────────────────────────── */
html[data-theme="dark"] {
    --bg:           #0f1923;
    --card:         #182535;
    --text:         #dce8f0;
    --text-light:   #8aabbd;
    --border:       #243447;
    --border-light: #1e2e40;
    --primary:      #5b9ec9;
    --primary-mid:  #4a8ab8;
}
html[data-theme="dark"] .hero,
html[data-theme="dark"] .cb-header,
html[data-theme="dark"] .hero-logo-box { background: #0E2535 !important; }
html[data-theme="dark"] .component-card { background: #182535; border-color: #243447; }
html[data-theme="dark"] .hero-tab        { color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.15); }
html[data-theme="dark"] .hero-tab:hover  { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.13); }
html[data-theme="dark"] .hero-tab.active { background: var(--accent) !important; color: #0E2535 !important; border-color: var(--accent) !important; font-weight: 700; }
html[data-theme="dark"] .community-tab       { background: #1e2f42; border-color: #2d4459; color: #9db8cc; }
html[data-theme="dark"] .community-tab.active { background: var(--primary-mid); color: #fff; border-color: var(--primary-mid); }
html[data-theme="dark"] .community-howto     { background: #1e2f42; border-color: #2d4459; }
html[data-theme="dark"] .community-howto-title { color: #a8c0d0; }
html[data-theme="dark"] .community-howto-steps { color: #b0c8d8; }
html[data-theme="dark"] .section-heading    { color: #dce8f0; }
html[data-theme="dark"] .section-sub        { color: #8aabbd; }
html[data-theme="dark"] .card-title         { color: #dce8f0; }
html[data-theme="dark"] .card-desc          { color: #8aabbd; }
/* Badges: high-contrast dark mode treatment */
html[data-theme="dark"] .card-badge              { background: #0E2535; color: #a8d0e8; border: 1px solid #2d4d68; opacity: 1; }
html[data-theme="dark"] .card-badge--mckinsey    { background: var(--accent); color: #0E2535; border-color: transparent; }
html[data-theme="dark"] .card-badge--bain        { background: #C41E24; color: #fff; border-color: transparent; }
html[data-theme="dark"] .card-badge--word        { background: #1e3a8a; color: #bfdbfe; border-color: #2563eb; }
html[data-theme="dark"] .card-badge--xlsx        { background: #14532d; color: #bbf7d0; border-color: #16a34a; }
/* Hub component cards - direct overrides so specificity is unambiguous */
html[data-theme="dark"] .component-card h3  { color: #dce8f0 !important; }
html[data-theme="dark"] .component-card p   { color: #c0d8e8 !important; }
/* Icon wrap: dark navy background so gold icon reads clearly */
html[data-theme="dark"] .card-icon-wrap     { background: #0E2535 !important; }
html[data-theme="dark"] .card-icon          { color: var(--accent) !important; }
html[data-theme="dark"] .hero-sub           { color: rgba(255,255,255,0.6); }
html[data-theme="dark"] .hub-user-info      { color: rgba(255,255,255,0.75); }
html[data-theme="dark"] .hub-btn            { color: rgba(255,255,255,0.75); border-color: rgba(255,255,255,0.22); }
html[data-theme="dark"] .hub-btn:hover      { background: rgba(255,255,255,0.1); color: #fff; }
html[data-theme="dark"] select, [data-theme="dark"] input, [data-theme="dark"] textarea {
    background: #1e2f42; color: var(--text); border-color: #2d4459;
}
html[data-theme="dark"] .community-form-card { background: #182535; border-color: #243447; }
html[data-theme="dark"] .community-form-card label { color: #9db8cc; }
html[data-theme="dark"] .community-slot-meta  { color: #8aabbd; }
html[data-theme="dark"] .community-slot-notes { color: #8aabbd; }
html[data-theme="dark"] .community-role-tag   { color: #8aabbd; }
html[data-theme="dark"] .community-status-badge.community-status--open   { background: rgba(26,122,58,0.2);  color: #4ade80; border-color: rgba(74,222,128,0.3); }
html[data-theme="dark"] .community-status-badge.community-status--booked { background: rgba(91,158,201,0.15); color: #7ab8d8; border-color: rgba(91,158,201,0.3); }
html[data-theme="dark"] .community-type-badge--case    { background: rgba(91,158,201,0.12); color: #7ab8d8; }
html[data-theme="dark"] .community-type-badge--mock    { background: rgba(201,168,76,0.18);  color: #d4aa55; }
html[data-theme="dark"] .community-type-badge--general { background: rgba(138,171,189,0.12); color: #8aabbd; }
html[data-theme="dark"] .btn-community-book { color: #0E2535; }
html[data-theme="dark"] .community-ban-notice { background: rgba(196,30,36,0.12); border-color: rgba(196,30,36,0.3); }
html[data-theme="dark"] .community-empty-state p { color: #8aabbd; }
/* ── Component-level broad dark overrides ─────────────────── */
html[data-theme="dark"] body { background: var(--bg); color: var(--text); }
html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .modal-box,
html[data-theme="dark"] .question-card,
html[data-theme="dark"] .drill-card,
html[data-theme="dark"] .answer-option,
html[data-theme="dark"] .result-card,
html[data-theme="dark"] .leaderboard-row,
html[data-theme="dark"] .score-card { background: #182535 !important; border-color: #243447 !important; color: var(--text) !important; }
html[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
html[data-theme="dark"] h4, [data-theme="dark"] h5 { color: #dce8f0; }
html[data-theme="dark"] p, [data-theme="dark"] span, [data-theme="dark"] li,
html[data-theme="dark"] label { color: inherit; }
html[data-theme="dark"] .cb-header { background: #0E2535 !important; }
html[data-theme="dark"] hr { border-color: #243447; }
/* ────────────────────────────────────────────────────────── */

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ============ ANIMATIONS ============ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes logoBreath {
    0%, 100% { box-shadow: 0 0 3px 1px rgba(201,168,76,0.08); }
    50%       { box-shadow: 0 0 10px 3px rgba(201,168,76,0.28); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ PLATFORM HEADER (component view) ============ */

.platform-header {
    background: var(--primary);
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.platform-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
}

.platform-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.platform-logo {
    border: 1.5px solid var(--accent);
    border-radius: 3px;
    padding: 0.25rem 0.65rem;
    font-family: var(--sans);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    animation: logoBreath 4s ease-in-out infinite;
}

.nav-breadcrumb {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.02em;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-back:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.35);
    color: #fff;
}

/* ============ HUB LAYOUT ============ */

#dashboard {
    min-height: 100vh;
}

.hub-panel.hidden {
    display: none;
}

/* Placeholder panels (Course / Templates) */
.hub-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    gap: 0.9rem;
    text-align: center;
    padding: 2rem;
}

.hub-placeholder-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.hub-placeholder-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-light);
}

.hub-placeholder h2 {
    font-family: var(--serif);
    font-size: 1.3rem;
    color: var(--text);
    margin: 0;
}

.hub-placeholder p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

/* ============ HUB USER BAR ============ */

.hub-user-bar {
    position: absolute;
    top: 14px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.hub-user-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    color: rgba(255,255,255,0.45);
    padding: 0 2px;
    margin-bottom: 2px;
}

.hub-username {
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

.hub-role-tag {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(201,168,76,0.15);
    color: var(--accent);
    border: 1px solid rgba(201,168,76,0.3);
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
}

.hub-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid rgba(255,255,255,0.14);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.hub-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.28);
    color: #fff;
}
.hub-btn-admin {
    border-color: rgba(201,168,76,0.35);
    color: var(--accent);
}
.hub-btn-admin:hover {
    background: rgba(201,168,76,0.08);
    border-color: var(--accent);
    color: var(--accent);
}
.hub-btn-logout {
    color: rgba(255,255,255,0.5);
}

/* ============ HERO SECTION ============ */

.hero {
    text-align: center;
    padding: 3.5rem 2rem 2.5rem;
    background: #0E2535;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
}

.hero-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.hero-logo-box {
    border: 1.5px solid var(--accent);
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.85rem;
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    background: transparent;
    animation: logoBreath 4s ease-in-out infinite;
}

.hero h1 {
    font-family: var(--serif);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
    line-height: 1.2;
}

.hero-sub {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.55;
    margin-bottom: 0.8rem;
}

.hero-desc {
    max-width: 520px;
    margin: 0 auto;
    font-size: 0.88rem;
    line-height: 1.65;
    opacity: 0.7;
}

/* ============ HERO TABS ============ */

.hero-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 1.8rem;
}

.hero-tab {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.65);
    padding: 0.45rem 1.25rem;
    border-radius: 100px;
    cursor: pointer;
    font-family: var(--sans);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.hero-tab:hover {
    background: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.9);
}

.hero-tab.active {
    background: white;
    color: var(--primary);
    border-color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ============ DASHBOARD BODY ============ */

.dashboard-body {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 2rem 3.5rem;
}

.section-heading {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.section-sub {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ============ CARD GRID ============ */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.component-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.4rem 1.25rem;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.4s ease both;
}

.component-card:nth-child(1) { animation-delay: 0.05s; }
.component-card:nth-child(2) { animation-delay: 0.10s; }
.component-card:nth-child(3) { animation-delay: 0.15s; }
.component-card:nth-child(4) { animation-delay: 0.20s; }
.component-card:nth-child(5) { animation-delay: 0.25s; }

.component-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.15s ease;
}

.component-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 12px rgba(22,51,71,0.10);
    transform: translateY(-2px);
}

.component-card:hover::before {
    transform: scaleX(1);
}

.card-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.card-icon {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.component-card h3 {
    font-family: var(--sans);
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.component-card p {
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 0.7rem;
}

.card-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 2px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Coming Soon overlay */
.component-card.coming-soon {
    cursor: default;
    pointer-events: none;
    position: relative;
}
.component-card.coming-soon > * {
    opacity: 0.5;
    filter: grayscale(1);
}
.component-card.coming-soon::after {
    content: 'COMING SOON';
    position: absolute;
    top: 0.7rem; right: 0.7rem;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--accent);
    padding: 0.2rem 0.55rem;
    border-radius: 3px;
    filter: none;
}

/* Coming Soon panel overlay */
.coming-soon-panel {
    position: relative;
}
.coming-soon-panel > .dashboard-body {
    opacity: 0.2;
    pointer-events: none;
    filter: grayscale(1);
}
.coming-soon-banner {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--accent);
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    display: inline-block;
    margin: 2rem auto 0;
    width: fit-content;
}

/* Allow component-card to be an <a> tag (resource links) */
a.component-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* PDF card icon variant - red */
.card-icon-wrap--pdf {
    background: #dc2626;
}

.card-icon-wrap--pdf .card-icon {
    color: #fff;
}

/* PDF badge variant */
.card-badge--pdf {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Excel card icon variant - green */
.card-icon-wrap--xlsx {
    background: #16a34a;
}

.card-icon-wrap--xlsx .card-icon {
    color: #fff;
}

/* Excel badge variant */
.card-badge--xlsx {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* McKinsey Prep section divider */
.section-divider {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    margin-bottom: 0;
}

/* McKinsey card icon variant - gold background */
.card-icon-wrap--mckinsey {
    background: var(--accent);
}

.card-icon-wrap--mckinsey .card-icon {
    color: var(--primary);
}

/* McKinsey badge variant */
.card-badge--mckinsey {
    background: var(--accent);
    color: var(--primary);
}

/* Bain card icon variant - red */
.card-icon-wrap--bain {
    background: #C41E24;
}

.card-icon-wrap--bain .card-icon {
    color: #fff;
}

/* Bain badge variant */
.card-badge--bain {
    background: #C41E24;
    color: #fff;
}

/* Word doc card icon variant - blue */
.card-icon-wrap--word {
    background: #2563eb;
}

.card-icon-wrap--word .card-icon {
    color: #fff;
}

/* Word doc badge variant */
.card-badge--word {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* Template card - badge + download icon row */
.card-dl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
}

.card-dl-row svg {
    color: var(--text-light);
    flex-shrink: 0;
}

/* ============ COACHING / CALENDLY PANEL ============ */

.calendly-wrapper {
    margin-top: 1.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--card);
}

#calendly-embed {
    min-width: 320px;
    height: 700px;
    width: 100%;
}

/* ============ BOOKING MODAL ============ */

.booking-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14, 36, 52, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.18s ease;
    backdrop-filter: blur(2px);
}
.booking-modal {
    background: var(--card);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(5,28,44,0.28);
    width: min(680px, 92vw);
    height: min(620px, 88vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-top: 3px solid var(--accent);
}
.booking-modal-header {
    background: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1.25rem;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(201,168,76,0.2);
}
.booking-modal-logo {
    font-family: var(--serif);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--accent);
    border: 1.5px solid var(--accent);
    padding: 2px 6px;
    border-radius: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}
.booking-modal-divider {
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
}
.booking-modal-title {
    font-family: var(--serif);
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.booking-modal-close {
    width: 28px;
    height: 28px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.18);
    background: transparent;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.booking-modal-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.35);
}
.booking-modal-body {
    flex: 1;
    position: relative;
    overflow: hidden;
}
.booking-modal-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--bg);
    color: var(--text-light);
    font-size: 0.875rem;
}
.booking-modal-loading-logo {
    font-family: var(--serif);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--accent);
    border: 1.5px solid var(--accent);
    padding: 2px 6px;
    border-radius: 2px;
}
.booking-modal iframe {
    position: absolute;
    inset: 0;
    border: none;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.booking-modal iframe.loaded { opacity: 1; }

/* ============ MODE SELECT (Red Rock) ============ */

#mode-select {
    min-height: 100vh;
    background: var(--primary);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.mode-select-body {
    text-align: center;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 2rem;
    animation: fadeIn 0.3s ease both;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mode-select-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.mode-select-title {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.mode-select-sub {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 2.5rem;
}

.mode-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.mode-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 2rem 1.5rem 1.75rem;
    cursor: pointer;
    transition: all 0.18s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.18s ease;
}

.mode-card:hover {
    background: rgba(201,168,76,0.07);
    border-color: rgba(201,168,76,0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.mode-card:hover::before {
    transform: scaleX(1);
}

.mode-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(201,168,76,0.1);
    border: 1px solid rgba(201,168,76,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.1rem;
}

.mode-card-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.mode-card h2 {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.mode-card p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.55;
    margin-bottom: 1.1rem;
}

.mode-badge {
    display: inline-block;
    border: 1px solid rgba(201,168,76,0.4);
    color: var(--accent);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 2px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 480px) {
    .mode-card-grid { grid-template-columns: 1fr; }
    .mode-select-title { font-size: 1.6rem; }
}

/* ============ COMPONENT VIEW (iframe) ============ */

#component-view {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
}

#component-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: var(--bg);
}

/* ============ PROFILE PANEL ============ */

.profile-grid {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 1.25rem;
    align-items: start;
    margin-bottom: 2.25rem;
}

.profile-info-card,
.profile-edit-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.profile-avatar {
    width: 52px;
    height: 52px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--sans);
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.profile-name {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.2rem;
    line-height: 1.25;
}

.profile-uname {
    font-size: 0.76rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.profile-email-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    color: var(--text-light);
    word-break: break-all;
}

.profile-role-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.18rem 0.55rem;
    border-radius: 3px;
    background: rgba(16,185,129,0.1);
    color: #059669;
    border: 1px solid rgba(16,185,129,0.25);
    margin-top: 0.75rem;
}

.profile-role-badge.standard {
    background: var(--bg);
    color: var(--text-light);
    border-color: var(--border);
}

.profile-edit-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.profile-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 1.1rem;
}

.profile-field label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    margin-bottom: 0.35rem;
}

.profile-field input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.55rem 0.75rem;
    font-size: 0.84rem;
    color: var(--text);
    font-family: var(--sans);
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.profile-field input:focus { border-color: var(--primary); }
.profile-field input::placeholder { color: var(--text-light); opacity: 0.55; }

.btn-save-profile {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.55rem 1.25rem;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--sans);
    cursor: pointer;
    transition: opacity 0.15s;
}
.btn-save-profile:hover    { opacity: 0.88; }
.btn-save-profile:disabled { opacity: 0.5; cursor: not-allowed; }

.profile-save-msg {
    font-size: 0.78rem;
    margin-left: 0.75rem;
    opacity: 0;
    transition: opacity 0.25s;
}
.profile-save-msg.visible     { opacity: 1; }
.profile-save-msg.profile-ok  { color: #16a34a; }
.profile-save-msg.profile-err { color: var(--danger, #C41E24); }

/* Session history */
.my-sessions-heading {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.my-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.85rem;
}

.my-session-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 0.85rem;
    align-items: start;
}

.my-session-date-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2px;
}

.my-session-day {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    font-family: var(--serif);
}

.my-session-mon {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-light);
    margin-top: 1px;
}

.my-session-type {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.my-session-meta {
    font-size: 0.74rem;
    color: var(--text-light);
}

.my-session-notes {
    font-size: 0.76rem;
    color: var(--text-light);
    font-style: italic;
    line-height: 1.45;
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--border);
}

.my-session-status-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding-top: 2px;
}

.sess-badge {
    display: inline-block;
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.17rem 0.5rem;
    border-radius: 3px;
}
.sess-badge.completed { background: rgba(22,163,74,0.1);  color: #16a34a; }
.sess-badge.scheduled { background: rgba(22,51,71,0.08);  color: var(--primary); }
.sess-badge.cancelled { background: rgba(196,30,36,0.08); color: #C41E24; }

.my-sessions-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-light);
    font-size: 0.83rem;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
}

@media (max-width: 640px) {
    .profile-grid            { grid-template-columns: 1fr; }
    .profile-fields          { grid-template-columns: 1fr; }
    .my-session-card         { grid-template-columns: 40px 1fr auto; gap: 0.6rem; }
}

/* ============ RESPONSIVE ============ */

@media (max-width: 600px) {
    .hero {
        padding: 2.5rem 1rem 2rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero-desc {
        font-size: 0.82rem;
    }

    .hub-user-bar {
        top: 10px;
        right: 12px;
        gap: 5px;
    }

    .hero-tabs {
        gap: 4px;
        flex-wrap: wrap;
        padding: 0 0.5rem;
    }

    .hero-tab {
        font-size: 0.76rem;
        padding: 0.4rem 0.9rem;
    }

    .dashboard-body {
        padding: 1.5rem 1rem 2.5rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .platform-header {
        padding: 0 14px;
    }

    .nav-breadcrumb {
        font-size: 0.7rem;
    }
}

/* ============================================================
   COMMUNITY PANEL
   ============================================================ */

/* Sub-view pill nav */
.community-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.community-tab {
    background: #fff;
    border: 1px solid #c8cfd6;
    color: var(--text-secondary);
    padding: 0.38rem 1rem;
    border-radius: 100px;
    cursor: pointer;
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.community-tab:hover {
    background: var(--bg);
    border-color: var(--primary);
    color: var(--primary);
}

.community-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 600;
}

/* Find a Partner filter bar */
.community-filter-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.community-filter-btn {
    background: #fff;
    border: 1px solid #c8cfd6;
    color: var(--text-secondary);
    padding: 0.3rem 0.9rem;
    border-radius: 100px;
    cursor: pointer;
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.community-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.community-filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

html[data-theme="dark"] .community-filter-btn { background: #1e2f42; border-color: #2d4459; color: #9db8cc; }
html[data-theme="dark"] .community-filter-btn.active { background: var(--primary-mid); color: #fff; border-color: var(--primary-mid); }

/* Sub-view toggle */
.community-view {
    animation: slideUp 0.25s ease both;
}

.community-view.hidden {
    display: none !important;
}

/* Offer Your Time form */
.community-form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.75rem 1.5rem;
    max-width: 640px;
}

.community-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.community-field--full {
    grid-column: 1 / -1;
}

.community-field label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
    display: block;
}

.community-field input,
.community-field select,
.community-field textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.52rem 0.75rem;
    font-family: var(--sans);
    font-size: 0.83rem;
    color: var(--text);
    background: var(--card);
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.community-field input:focus,
.community-field select:focus,
.community-field textarea:focus {
    border-color: var(--primary);
}

.community-field textarea {
    resize: vertical;
    min-height: 72px;
}

.community-optional {
    font-size: 0.65rem;
    color: var(--text-light);
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
    margin-left: 2px;
}

.req { color: var(--danger); }

.community-form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.community-form-msg { font-size: 0.8rem; }
.community-form-msg.ok  { color: var(--success); }
.community-form-msg.err { color: var(--danger); }

/* Day-of-week picker */
.offer-days-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}
.offer-day-btn {
    padding: 0.3rem 0.85rem;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary, var(--text-light));
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.02em;
}
.offer-day-btn:hover  { border-color: var(--primary); color: var(--primary); }
.offer-day-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.offer-day-btn:disabled { opacity: 0.28; cursor: not-allowed; pointer-events: none; }
/* Time range picker */
.offer-time-ranges-list {
    display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.5rem; min-height: 0;
}
.offer-time-chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: var(--primary); color: #fff;
    border-radius: 99px; padding: 0.25rem 0.75rem 0.25rem 0.85rem;
    font-size: 0.78rem; font-weight: 600; font-family: var(--sans);
}
.offer-time-chip-remove {
    background: none; border: none; color: rgba(255,255,255,0.7);
    font-size: 1rem; line-height: 1; cursor: pointer; padding: 0; margin: 0;
}
.offer-time-chip-remove:hover { color: #fff; }
.offer-time-add-row {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.offer-time-add-row input[type="time"] {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 0.4rem 0.6rem; font-size: 0.85rem; font-family: var(--sans);
    background: var(--card-bg, #fff); color: var(--text);
    flex: 1; min-width: 110px;
}
.offer-time-sep { font-size: 0.8rem; color: var(--text-light); white-space: nowrap; }
.offer-time-add-btn {
    background: transparent; border: 1.5px solid var(--primary); color: var(--primary);
    border-radius: var(--radius); padding: 0.4rem 0.9rem;
    font-size: 0.8rem; font-weight: 700; font-family: var(--sans);
    cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.offer-time-add-btn:hover { background: var(--primary); color: #fff; }
.offer-time-msg { font-size: 0.75rem; color: #c0392b; margin-top: 0.35rem; min-height: 1em; }
.offer-slots-preview {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.45rem;
    min-height: 1.1em;
}
.offer-slots-preview.has-slots { color: var(--accent); font-weight: 600; }
html[data-theme="dark"] .offer-day-btn        { border-color: #2d4459; color: #9db8cc; }
html[data-theme="dark"] .offer-day-btn:hover  { border-color: var(--primary); color: var(--primary); }
html[data-theme="dark"] .offer-day-btn.active { background: var(--primary-mid); border-color: var(--primary-mid); color: #fff; }

/* ── JOBS BOARD ─────────────────────────────────────────── */
.jobs-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.jobs-search-wrap {
    position: relative;
    flex: 0 0 260px;
}
.jobs-search-icon {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    width: 15px; height: 15px;
    color: var(--text-light);
    pointer-events: none;
}
.jobs-search {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: var(--card);
    color: var(--text);
    outline: none;
    transition: border-color 0.15s;
}
.jobs-search:focus { border-color: var(--primary); }

.jobs-company-pills {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    flex: 1;
}
.jobs-pill {
    padding: 0.3rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--card);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.jobs-pill:hover  { border-color: var(--primary); color: var(--primary); }
.jobs-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.jobs-pill-count  { opacity: 0.65; font-size: 0.78em; font-weight: 600; }
.jobs-pill.active .jobs-pill-count { opacity: 0.8; }

.jobs-refresh-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.jobs-refresh-btn:hover   { border-color: var(--primary); color: var(--primary); }
.jobs-refresh-btn.loading { opacity: 0.6; pointer-events: none; }
.jobs-refresh-btn.loading svg { animation: spin 0.8s linear infinite; }

.jobs-last-updated {
    font-size: 0.73rem;
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.job-card {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.job-card:hover { box-shadow: var(--shadow-lg); border-color: var(--border); }

.job-card-company {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}
.job-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.35;
}
.job-card-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.15rem;
}
.job-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.73rem;
    color: var(--text-light);
}
.job-card-tag svg { flex-shrink: 0; }

.job-card-apply {
    margin-top: auto;
    padding-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
}
.job-apply-btn {
    display: inline-block;
    padding: 0.45rem 1.1rem;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
}
.job-apply-btn:hover { background: var(--primary-mid); }

.jobs-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}
.jobs-empty strong { display: block; font-size: 1rem; margin-bottom: 0.35rem; color: var(--text); }

/* dark mode */
html[data-theme="dark"] .jobs-search   { background: var(--card); border-color: #2d4459; }
html[data-theme="dark"] .jobs-pill     { border-color: #2d4459; color: #9db8cc; }
html[data-theme="dark"] .jobs-pill.active { background: var(--primary-mid); border-color: var(--primary-mid); color: #fff; }
html[data-theme="dark"] .job-card      { border-color: #2d4459; }
html[data-theme="dark"] .jobs-refresh-btn { border-color: #2d4459; color: #9db8cc; }

/* Buttons */
.btn-community-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 0.55rem 1.25rem;
    font-family: var(--sans);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.btn-community-primary:hover    { background: var(--primary-mid); }
.btn-community-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-community-book {
    margin-left: auto;
    background: var(--accent);
    color: var(--primary);
    border: none;
    border-radius: var(--radius);
    padding: 0.38rem 0.9rem;
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.btn-community-book:hover { background: var(--accent-dark); }

.btn-community-cancel {
    margin-left: auto;
    background: none;
    border: 1px solid rgba(196,30,36,0.25);
    border-radius: var(--radius);
    padding: 0.35rem 0.8rem;
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--danger);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-community-cancel:hover    { background: rgba(196,30,36,0.06); border-color: var(--danger); }
.btn-community-cancel:disabled { opacity: 0.4; cursor: not-allowed; border-color: var(--border); color: var(--text-light); }

.btn-community-noshow {
    display: inline-flex; align-items: center;
    background: none; border: 1px solid rgba(196,30,36,0.3);
    border-radius: var(--radius); padding: 0.3rem 0.65rem;
    font-family: var(--sans); font-size: 0.75rem; font-weight: 600;
    color: var(--danger); cursor: pointer; transition: all 0.15s;
}
.btn-community-noshow:hover { background: rgba(196,30,36,0.07); border-color: var(--danger); }

.community-ban-notice {
    display: flex; align-items: flex-start; gap: 1rem;
    background: rgba(196,30,36,0.06); border: 1px solid rgba(196,30,36,0.2);
    border-radius: var(--radius-md); padding: 1.25rem; color: var(--text);
}
.community-ban-notice svg { color: var(--danger); flex-shrink: 0; margin-top: 2px; }
.community-ban-notice strong { display: block; font-size: 0.9rem; margin-bottom: 0.35rem; color: var(--danger); }
.community-ban-notice p { font-size: 0.83rem; color: var(--text-light); margin-bottom: 0.2rem; }

.btn-community-meet {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    background: none;
    border: 1px solid rgba(21,128,61,0.3);
    border-radius: var(--radius);
    padding: 0.35rem 0.8rem;
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 600;
    color: #15803d;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-community-meet:hover { background: rgba(21,128,61,0.07); border-color: #15803d; }

/* Card layouts */
.community-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.7rem;
}

.community-card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.community-slot-meta {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.community-slot-notes {
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.5;
    min-height: 1.2em;
}

/* Type icon wrap variants */
.community-type-icon--case    { background: var(--primary); }
.community-type-icon--case    .card-icon { color: var(--accent); }
.community-type-icon--mock    { background: var(--accent); }
.community-type-icon--mock    .card-icon { color: var(--primary); }
.community-type-icon--general { background: #5A6B7B; }
.community-type-icon--general .card-icon { color: #fff; }

/* Type badge variants (extend .card-badge) */
.community-type-badge--case    { background: rgba(22,51,71,0.08);    color: var(--primary); }
.community-type-badge--mock    { background: rgba(201,168,76,0.15);  color: #7a5e1a; }
.community-type-badge--general { background: rgba(90,107,123,0.1);  color: #4a5a68; }

/* Status badges */
.community-status-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 2px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.community-status--open      { background: rgba(21,128,61,0.1);   color: #15803d; }
.community-status--booked    { background: rgba(90,107,123,0.1);  color: #4a5a68; }
.community-status--cancelled { background: rgba(90,107,123,0.08); color: #9aa5b1; }

/* Role tag */
.community-role-tag {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-light);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 0.1rem 0.45rem;
    white-space: nowrap;
}

/* Empty / loading state */
.community-empty-state {
    grid-column: 1 / -1;
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.community-empty-state p { margin: 0; }

/* How to use + notify */
.community-howto {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.4rem 1rem;
    margin-bottom: 1.25rem;
}
.community-howto-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-secondary);
    margin: 0 0 0.55rem;
}
.community-howto-steps {
    margin: 0 0 0.9rem 1.1rem;
    padding: 0;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.65;
}
.community-howto-steps li { margin-bottom: 0.15rem; }
.community-notify-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.83rem;
    color: var(--text);
    cursor: pointer;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.community-notify-row input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .community-form-grid { grid-template-columns: 1fr; }
    .community-field--full { grid-column: 1; }
}

/* ── BUG REPORT ─────────────────────────────────────────── */
#bug-report-fab {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--primary, #0E2535);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: transform 0.15s, background 0.15s;
}
#bug-report-fab:hover { transform: scale(1.1); background: var(--primary-mid, #1E4A68); }

.bug-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
}
.bug-overlay.hidden { display: none; }

.bug-modal {
    background: var(--card, #fff);
    border-radius: var(--radius-md, 8px);
    width: 94%; max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    overflow: hidden;
}
.bug-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border, #D4DAE3);
    background: #0E2535;
    color: #fff;
}
.bug-modal-title { font-family: var(--serif); font-size: 0.95rem; font-weight: 700; }
.bug-modal-close {
    background: none; border: none; color: #fff; font-size: 1.4rem;
    cursor: pointer; line-height: 1; padding: 0 0.2rem;
}
.bug-modal-body { padding: 1rem; }
.bug-modal-body label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text); }
.bug-modal-body textarea {
    width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 0.6rem; font-size: 0.85rem; font-family: var(--sans);
    resize: vertical; min-height: 80px; color: var(--text); background: var(--card);
}
.bug-modal-body textarea:focus { outline: none; border-color: var(--accent); }
.bug-auto-note { font-size: 0.72rem; color: var(--text-light); margin-top: 0.4rem; }
.bug-modal-footer { padding: 0 1rem 1rem; text-align: right; }
.bug-submit-btn {
    background: var(--accent, #C9A84C); color: #0E2535; border: none;
    padding: 0.5rem 1.2rem; border-radius: var(--radius); font-weight: 600;
    font-size: 0.82rem; cursor: pointer; transition: background 0.15s;
}
.bug-submit-btn:hover { background: var(--accent-dark, #A8882E); }
.bug-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
