/* ============================================================
   AutoRooster Community CSS
   ============================================================ */

/* ── Hero Section ──────────────────────────────────────────── */
.cm-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 60px 0 48px;
    text-align: center;
    color: #fff;
}
.cm-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 8px;
}
.cm-hero p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.7);
    margin: 0;
}
.cm-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 10px 20px;
    flex-wrap: wrap;
    justify-content: center;
}
.cm-xp {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}
.cm-progress-wrap {
    width: 100px;
    height: 6px;
    background: rgba(255,255,255,0.12);
    border-radius: 3px;
    overflow: hidden;
}
.cm-progress-bar {
    height: 100%;
    background: #FF6B00;
    border-radius: 3px;
    transition: width 0.4s ease;
}
.cm-progress-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}

/* ── Tier Badges ───────────────────────────────────────────── */
.cm-tier {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}
.cm-tier-egg         { background: #e5e7eb; color: #6b7280; }
.cm-tier-hatchling   { background: #d1fae5; color: #059669; }
.cm-tier-free_ranger { background: #dbeafe; color: #2563eb; }
.cm-tier-scout       { background: #fef3c7; color: #d97706; }
.cm-tier-the_roost   { background: linear-gradient(135deg,#fbbf24,#f59e0b); color: #78350f; }

/* ── Hub Grid ──────────────────────────────────────────────── */
.cm-hub {
    padding: 40px 20px 60px;
    max-width: 1200px;
    margin: 0 auto;
}
.cm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}
.cm-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 28px 24px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
}
.cm-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.cm-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}
.cm-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #111827;
}
.cm-card p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    flex: 1;
    line-height: 1.5;
}
.cm-card-stat {
    display: inline-block;
    margin-top: 14px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #9ca3af;
}

/* ── Pecking Order Section ─────────────────────────────────── */
.cm-pecking-order {
    text-align: center;
    margin-top: 20px;
}
.cm-pecking-order h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: #111827;
}
.cm-po-sub {
    color: #6b7280;
    margin: 0 0 28px;
    font-size: 0.95rem;
}
.cm-tiers {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.cm-tier-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px 20px;
    width: 190px;
    text-align: center;
    position: relative;
    transition: transform 0.15s ease;
}
.cm-tier-card:hover {
    transform: translateY(-2px);
}
.cm-tier-current {
    border-color: #FF6B00;
    box-shadow: 0 0 0 3px rgba(255,107,0,0.12);
}
.cm-tier-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #FF6B00;
}
.cm-tier-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #111827;
}
.cm-tier-xp {
    font-size: 0.8rem;
    font-weight: 600;
    color: #FF6B00;
    margin-bottom: 8px;
}
.cm-tier-card p {
    font-size: 0.78rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}
.cm-tier-you {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #FF6B00;
}

/* ── Feature Pages ─────────────────────────────────────────── */
.cm-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}
.cm-main .cm-page {
    padding: 0;
}
.cm-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}
.cm-page-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    color: #111827;
}
.cm-page-header p {
    width: 100%;
    font-size: 0.9rem;
    color: #6b7280;
    margin: 4px 0 0;
}
.cm-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: none;
    margin-bottom: 16px;
}
.cm-back:hover { color: #FF6B00; }

/* ── Buttons ───────────────────────────────────────────────── */
.cm-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.15s ease;
    text-decoration: none;
}
.cm-btn-primary {
    background: #FF6B00;
    color: #fff;
}
.cm-btn-primary:hover { background: #e65e00; }
.cm-btn-ghost {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #374151;
}
.cm-btn-ghost:hover {
    border-color: #FF6B00;
    color: #FF6B00;
}
.cm-btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 8px;
}
.cm-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.15s;
}
.cm-btn-icon:hover { border-color: #FF6B00; color: #FF6B00; }
.cm-btn-icon.active { background: #FF6B00; color: #fff; border-color: #FF6B00; }

/* ── Feed Cards ────────────────────────────────────────────── */
.cm-feed { display: flex; flex-direction: column; gap: 20px; }

.cm-post {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}
.cm-post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px 12px;
}
.cm-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #6b7280;
    overflow: hidden;
    flex-shrink: 0;
}
.cm-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cm-post-user {
    flex: 1;
    min-width: 0;
}
.cm-post-username {
    font-weight: 600;
    font-size: 0.9rem;
    color: #111827;
}
.cm-post-meta {
    font-size: 0.78rem;
    color: #9ca3af;
}
.cm-post-body {
    padding: 0 20px 14px;
}
.cm-post-body p {
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.55;
}
.cm-post-milestone {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,107,0,0.08);
    color: #FF6B00;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.cm-post-photos {
    display: grid;
    gap: 2px;
}
.cm-post-photos.cm-photos-1 { grid-template-columns: 1fr; }
.cm-post-photos.cm-photos-2 { grid-template-columns: 1fr 1fr; }
.cm-post-photos.cm-photos-3 { grid-template-columns: 1fr 1fr; }
.cm-post-photos img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}
.cm-post-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 20px;
    border-top: 1px solid #f3f4f6;
}
.cm-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: #6b7280;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 0;
    transition: color 0.15s;
}
.cm-action-btn:hover { color: #FF6B00; }
.cm-action-btn.liked { color: #EF4444; }
.cm-action-btn.liked i { font-weight: bold; }

/* ── Comments ──────────────────────────────────────────────── */
.cm-comments {
    border-top: 1px solid #f3f4f6;
    padding: 12px 20px 16px;
    display: none;
}
.cm-comments.open { display: block; }
.cm-comment {
    display: flex;
    gap: 10px;
    padding: 8px 0;
}
.cm-comment-body {
    flex: 1;
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.45;
}
.cm-comment-user {
    font-weight: 600;
    color: #111827;
    margin-right: 6px;
}
.cm-comment-time {
    font-size: 0.72rem;
    color: #9ca3af;
    margin-left: 6px;
}
.cm-comment-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.cm-comment-form input {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
}
.cm-comment-form input:focus { border-color: #FF6B00; }

/* ── Forms / Modals ────────────────────────────────────────── */
.cm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.cm-modal-overlay.open { display: flex; }

.cm-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
}
.cm-modal h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 20px;
    color: #111827;
}
.cm-form-group {
    margin-bottom: 16px;
}
.cm-form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.cm-form-group input,
.cm-form-group select,
.cm-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.cm-form-group input:focus,
.cm-form-group select:focus,
.cm-form-group textarea:focus {
    border-color: #FF6B00;
}
.cm-form-group textarea {
    resize: vertical;
    min-height: 80px;
}
.cm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.cm-form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}
.cm-char-count {
    font-size: 0.72rem;
    color: #9ca3af;
    text-align: right;
    margin-top: 4px;
}
.cm-char-count.warn { color: #EF4444; }
.cm-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ── Stars ─────────────────────────────────────────────────── */
.cm-stars {
    display: inline-flex;
    gap: 2px;
    color: #fbbf24;
    font-size: 1rem;
}
.cm-stars .empty { color: #e5e7eb; }

.cm-star-input {
    display: flex;
    gap: 4px;
}
.cm-star-input i {
    font-size: 1.5rem;
    color: #e5e7eb;
    cursor: pointer;
    transition: color 0.1s;
}
.cm-star-input i.active { color: #fbbf24; }
.cm-star-input i:hover { color: #fbbf24; }

/* ── Review Cards ──────────────────────────────────────────── */
.cm-review-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}
.cm-review-product {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}
.cm-review-cat {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 10px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 8px;
    text-transform: capitalize;
}
.cm-review-body {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.5;
    margin-bottom: 10px;
}
.cm-review-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.cm-helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    padding: 5px 14px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.cm-helpful-btn:hover { border-color: #10B981; color: #10B981; }
.cm-helpful-btn.voted { background: #d1fae5; border-color: #10B981; color: #059669; }

/* ── Estimate Cards ────────────────────────────────────────── */
.cm-estimate-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}
.cm-estimate-cost {
    font-size: 1.5rem;
    font-weight: 800;
    color: #10B981;
}
.cm-estimate-repair {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}
.cm-estimate-car {
    font-size: 0.82rem;
    color: #6b7280;
}
.cm-estimate-details {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.cm-estimate-detail {
    font-size: 0.78rem;
    color: #9ca3af;
}
.cm-estimate-detail strong {
    color: #6b7280;
}
.cm-dealer-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    background: #dbeafe;
    color: #2563eb;
    letter-spacing: 0.03em;
}

/* ── MPG Logger ────────────────────────────────────────────── */
.cm-mpg-avg {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}
.cm-mpg-avg-num {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}
.cm-mpg-avg-label {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 4px;
}
.cm-mpg-breakdown {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 14px;
}
.cm-mpg-breakdown div {
    text-align: center;
}
.cm-mpg-breakdown strong {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
}
.cm-mpg-breakdown span {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ── Odometer Leaderboard ──────────────────────────────────── */
.cm-leaderboard {
    counter-reset: leaderboard;
}
.cm-lb-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 8px;
}
.cm-lb-row::before {
    counter-increment: leaderboard;
    content: "#" counter(leaderboard);
    font-weight: 800;
    font-size: 0.9rem;
    color: #9ca3af;
    min-width: 36px;
}
.cm-lb-row:nth-child(1)::before { color: #fbbf24; }
.cm-lb-row:nth-child(2)::before { color: #94a3b8; }
.cm-lb-row:nth-child(3)::before { color: #cd7f32; }

.cm-lb-miles {
    font-size: 1.2rem;
    font-weight: 800;
    color: #FF6B00;
    margin-left: auto;
    white-space: nowrap;
}
.cm-lb-car {
    font-weight: 600;
    color: #111827;
    font-size: 0.9rem;
}
.cm-lb-user {
    font-size: 0.78rem;
    color: #6b7280;
}

/* ── Gen Gap ───────────────────────────────────────────────── */
.cm-gap-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}
.cm-gap-photo {
    width: 100%;
    height: 280px;
    object-fit: cover;
}
.cm-gap-challenge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.cm-challenge-older { background: #fef3c7; color: #d97706; }
.cm-challenge-newer { background: #dbeafe; color: #2563eb; }

/* ── Rig Cards ─────────────────────────────────────────────── */
.cm-rig-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.cm-rig-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}
.cm-rig-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f3f4f6;
}
.cm-rig-info {
    padding: 16px;
}
.cm-rig-type {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #EC4899;
    margin-bottom: 4px;
}
.cm-rig-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}
.cm-rig-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #6b7280;
}

/* ── Filters / Tabs ────────────────────────────────────────── */
.cm-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.cm-filter-btn {
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.cm-filter-btn:hover { border-color: #FF6B00; color: #FF6B00; }
.cm-filter-btn.active {
    background: #FF6B00;
    color: #fff;
    border-color: #FF6B00;
}

/* ── Empty State ───────────────────────────────────────────── */
.cm-empty {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}
.cm-empty i {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}
.cm-empty h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #6b7280;
    margin: 0 0 6px;
}
.cm-empty p {
    font-size: 0.875rem;
    margin: 0 0 16px;
}

/* ── Loading ───────────────────────────────────────────────── */
.cm-loading {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-size: 0.9rem;
}
.cm-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #e5e7eb;
    border-top-color: #FF6B00;
    border-radius: 50%;
    animation: cm-spin 0.6s linear infinite;
}
@keyframes cm-spin { to { transform: rotate(360deg); } }

/* ── Sidebar Layout ────────────────────────────────────────── */
body.cm-layout {
    padding-bottom: 0;
}
body.cm-layout .cm-content-wrap {
    display: flex;
    min-height: calc(100vh - 60px);
}
.cm-sidebar {
    position: sticky;
    top: 0;
    left: 0;
    width: 260px;
    min-width: 260px;
    height: 100vh;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    padding: 20px 16px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    flex-shrink: 0;
}
.cm-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #111827;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 20px;
    padding: 4px 0;
}
.cm-logo-mark {
    width: 36px;
    height: 36px;
    background: #FF6B00;
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.cm-logo-sub {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: #9ca3af;
}

/* Sidebar XP */
.cm-sidebar-xp {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}
.cm-sidebar-tier {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.cm-xp-num {
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
}
.cm-sidebar-progress {
    width: 100%;
    height: 5px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}
.cm-sidebar-progress-bar {
    height: 100%;
    background: #FF6B00;
    border-radius: 3px;
    transition: width 0.4s ease;
}
.cm-sidebar-progress-label {
    font-size: 0.7rem;
    color: #9ca3af;
}

/* Sidebar Nav */
.cm-sidebar-nav {
    flex: 1 1 auto;
}
.cm-sidebar-section {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    padding: 16px 10px 6px;
}
.cm-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: all 0.12s;
}
.cm-sidebar-link:hover {
    background: #f3f4f6;
    color: #111827;
}
.cm-sidebar-link.active {
    background: rgba(255,107,0,0.08);
    color: #FF6B00;
    font-weight: 600;
}
.cm-sidebar-link i {
    font-size: 1.15rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.cm-sidebar-count {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 600;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 1px 8px;
    border-radius: 10px;
}
.cm-sidebar-foot {
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
    margin-top: 12px;
    flex-shrink: 0;
}

/* Main Content */
.cm-main {
    flex: 1;
    min-width: 0;
    padding: 32px 40px 60px;
}
.cm-main-header {
    margin-bottom: 32px;
}
.cm-main-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: #111827;
}
.cm-main-header p {
    font-size: 0.92rem;
    color: #6b7280;
    margin: 0;
}

/* Mobile Bottom Nav */
.cm-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    z-index: 200;
    padding: 6px 0 env(safe-area-inset-bottom, 6px);
    justify-content: space-around;
}
.cm-bnav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.65rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    padding: 6px 8px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}
.cm-bnav-btn i { font-size: 1.3rem; }
.cm-bnav-btn.active { color: #FF6B00; }

/* Mobile Drawer */
.cm-mobile-drawer {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 300;
    display: none;
}
.cm-mobile-drawer.open { display: block; }
.cm-mobile-drawer-inner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}
.cm-mobile-drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.cm-mobile-drawer-head h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}
.cm-mobile-drawer-head button {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .cm-rig-grid { grid-template-columns: 1fr; }
    .cm-tiers { justify-content: center; }
    .cm-tier-card { width: 160px; }
    .cm-sidebar { display: none; }
    .cm-main { padding: 24px 20px 100px; }
    .cm-bottom-nav { display: flex; }
}
@media (max-width: 600px) {
    .cm-hero { padding: 40px 16px 32px; }
    .cm-hero h1 { font-size: 1.6rem; }
    .cm-hub { padding: 24px 16px 40px; }
    .cm-page { padding: 20px 16px 40px; }
    .cm-form-row, .cm-form-row-3 { grid-template-columns: 1fr; }
    .cm-modal { padding: 20px; border-radius: 12px; }
    .cm-post-photos img { height: 180px; }
}
