/* ============================================================
   AE WORKOUT APP — styles.css
   Carbon Black Theme / Bright Red Accents
   Standalone Netlify-ready
   ============================================================ */

/* ==================== CSS CUSTOM PROPERTIES ==================== */
:root {
    --carbon-950: #0a0a0a;
    --carbon-900: #111111;
    --carbon-850: #161616;
    --carbon-800: #1a1a1a;
    --carbon-700: #242424;
    --carbon-600: #2e2e2e;
    --carbon-500: #3a3a3a;
    --carbon-400: #555555;
    --carbon-300: #777777;
    --carbon-200: #999999;
    --carbon-100: #bbbbbb;

    --accent-700: #b91c1c;
    --accent-600: #dc2626;
    --accent-500: #ef4444;
    --accent-400: #f87171;
    --accent-300: #fca5a5;

    --text-primary: #e5e5e5;
    --text-secondary: #999999;
    --text-muted: #555555;

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Oswald', sans-serif;

    --sidebar-width-expanded: 14rem;   /* 224px */
    --sidebar-width-collapsed: 4rem;   /* 64px */
    --topbar-height: 3.5rem;           /* 56px */

    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-full: 9999px;

    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ==================== BASE & RESET ==================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--carbon-950);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Tabular numbers for stats */
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* ==================== SCROLLBAR STYLING ==================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--carbon-900);
}

::-webkit-scrollbar-thumb {
    background: var(--carbon-500);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--carbon-400);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--carbon-500) var(--carbon-900);
}

/* ==================== LOGIN PAGE ==================== */
.login-pulse {
    animation: loginPulse 2s ease-in-out infinite;
}

@keyframes loginPulse {
    0%, 100% { opacity: 0.4; transform: scaleX(0.6); }
    50% { opacity: 1; transform: scaleX(1); }
}

#login-view {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#login-view.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* ==================== SIDEBAR ==================== */
.sidebar-expanded {
    width: var(--sidebar-width-expanded);
}

.sidebar-collapsed {
    width: var(--sidebar-width-collapsed);
}

.sidebar-collapsed .sidebar-label {
    display: none;
}

.sidebar-collapsed .sidebar-toggle-icon {
    transform: rotate(180deg);
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    border: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
    text-align: left;
    min-height: 44px;
    position: relative;
}

.sidebar-nav-item:hover {
    color: var(--text-primary);
    background: var(--carbon-800);
}

.sidebar-nav-item.active {
    color: var(--accent-400);
    background: rgba(220, 38, 38, 0.08);
}

.sidebar-nav-item.active::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent-600);
    border-radius: var(--radius-full);
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from { height: 0; }
    to { height: 60%; }
}

/* ==================== MOBILE NAV ==================== */
.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
    text-align: left;
    min-height: 48px;
    transition: all var(--transition-normal);
}

.mobile-nav-item:hover {
    color: var(--text-primary);
    background: var(--carbon-800);
}

.mobile-nav-item.active {
    color: var(--accent-400);
    background: rgba(220, 38, 38, 0.08);
    border-left: 3px solid var(--accent-600);
}

/* ==================== STAT CARDS ==================== */
.stat-card {
    background: var(--carbon-800);
    border: 1px solid var(--carbon-700);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    border-color: rgba(220, 38, 38, 0.3);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.05);
}

/* ==================== CONTENT CARDS ==================== */
.content-card {
    background: var(--carbon-800);
    border: 1px solid var(--carbon-700);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    transition: border-color var(--transition-normal);
}

.content-card:hover {
    border-color: var(--carbon-600);
}

/* ==================== FILTER CHIPS ==================== */
.filter-chip {
    padding: 0.375rem 1rem;
    background: var(--carbon-700);
    border: 1px solid var(--carbon-600);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    min-height: 36px;
}

.filter-chip:hover {
    background: var(--carbon-600);
    color: var(--text-primary);
}

.filter-chip.active {
    background: var(--accent-600);
    border-color: var(--accent-600);
    color: white;
}

/* ==================== INPUT FIELDS ==================== */
.input-field {
    width: 100%;
    background: var(--carbon-700);
    border: 1px solid var(--carbon-500);
    border-radius: var(--radius-md);
    padding: 0.625rem 0.875rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: var(--font-body);
    transition: border-color var(--transition-normal);
}

.input-field::placeholder {
    color: var(--carbon-400);
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-600);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

/* ==================== TABLES ==================== */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    text-align: left;
    padding: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--carbon-700);
}

.data-table td {
    padding: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--carbon-700);
}

.data-table tr:hover td {
    background: var(--carbon-700);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* ==================== ADMIN TABS ==================== */
.admin-tab {
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    min-height: 44px;
    white-space: nowrap;
}

.admin-tab:hover {
    color: var(--text-primary);
}

.admin-tab.active {
    color: var(--accent-400);
    border-bottom-color: var(--accent-600);
}

/* ==================== EXERCISE CARDS ==================== */
.exercise-card {
    background: var(--carbon-800);
    border: 1px solid var(--carbon-700);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.exercise-card:hover {
    border-color: rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.muscle-badge {
    display: inline-flex;
    padding: 0.25rem 0.625rem;
    background: rgba(220, 38, 38, 0.15);
    color: var(--accent-400);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.equipment-badge {
    display: inline-flex;
    padding: 0.25rem 0.625rem;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

/* ==================== WORKOUT HISTORY CARDS ==================== */
.workout-card {
    background: var(--carbon-800);
    border: 1px solid var(--carbon-700);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: border-color var(--transition-normal);
}

.workout-card:hover {
    border-color: var(--carbon-600);
}

.workout-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: background var(--transition-normal);
    min-height: 60px;
}

.workout-card-header:hover {
    background: var(--carbon-700);
}

.workout-card-details {
    display: none;
    padding: 0 1.25rem 1rem;
    border-top: 1px solid var(--carbon-700);
}

.workout-card.expanded .workout-card-details {
    display: block;
}

.workout-card .chevron-icon {
    transition: transform var(--transition-normal);
}

.workout-card.expanded .chevron-icon {
    transform: rotate(180deg);
}

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--carbon-800);
    border: 1px solid var(--carbon-700);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1.5rem;
    transform: translateY(20px) scale(0.97);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

/* ==================== VIDEO PLAYER ==================== */
.video-container {
    position: relative;
    width: 100%;
    background: var(--carbon-900);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--carbon-700);
}

.video-container video {
    width: 100%;
    display: block;
    border-radius: var(--radius-lg);
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--text-muted);
    gap: 0.5rem;
}

.video-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* ==================== MUSCLE MAP IMAGES ==================== */
.muscle-map-btn {
    padding: 0.5rem;
    background: var(--carbon-700);
    border: 1px solid var(--carbon-600);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    min-height: 40px;
}

.muscle-map-btn:hover {
    background: var(--carbon-600);
    color: var(--text-primary);
}

.muscle-map-btn.active {
    background: rgba(220, 38, 38, 0.15);
    border-color: var(--accent-600);
    color: var(--accent-400);
}

#dash-muscle-display img,
#ex-muscle-display img,
#modal-muscle-img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.muscle-img-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--accent-600);
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast {
    background: var(--carbon-800);
    border: 1px solid var(--carbon-700);
    border-left: 3px solid var(--accent-600);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    min-width: 280px;
    max-width: 380px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    animation: toastSlideIn 0.3s ease;
    font-size: 0.875rem;
}

.toast.success {
    border-left-color: #10b981;
}

.toast.error {
    border-left-color: var(--accent-700);
}

.toast-exit {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ==================== BUTTONS ==================== */
.btn-primary {
    background: var(--accent-600);
    color: white;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: var(--font-body);
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
}

.btn-primary:hover {
    background: var(--accent-500);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--carbon-700);
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--carbon-600);
    cursor: pointer;
    font-size: 0.875rem;
    font-family: var(--font-body);
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
}

.btn-secondary:hover {
    background: var(--carbon-600);
    border-color: var(--carbon-500);
}

.btn-danger {
    background: transparent;
    color: var(--accent-400);
    font-weight: 500;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-danger:hover {
    background: rgba(220, 38, 38, 0.15);
    color: var(--accent-500);
}

/* ==================== LOADING / SKELETON ==================== */
.skeleton {
    background: linear-gradient(90deg, var(--carbon-700) 25%, var(--carbon-600) 50%, var(--carbon-700) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--carbon-700);
    border-top-color: var(--accent-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== CHART CONTAINERS ==================== */
canvas {
    max-width: 100%;
}

/* ==================== BADGE STYLES ==================== */
.badge-type {
    display: inline-flex;
    padding: 0.1875rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-push {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.badge-pull {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

.badge-legs {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

.badge-upper {
    background: rgba(168, 85, 247, 0.15);
    color: #c4b5fd;
}

.badge-lower {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
}

.badge-full {
    background: rgba(236, 72, 153, 0.15);
    color: #f9a8d4;
}

/* ==================== SETTINGS PANEL ==================== */
.settings-section {
    border-bottom: 1px solid var(--carbon-700);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    background: var(--carbon-600);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-normal);
    border: none;
    padding: 0;
}

.toggle-switch.active {
    background: var(--accent-600);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition-normal);
}

.toggle-switch.active::after {
    transform: translateX(22px);
}

/* ==================== TEMPLATE CARDS ==================== */
.template-card {
    background: var(--carbon-800);
    border: 1px solid var(--carbon-700);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    transition: all var(--transition-normal);
}

.template-card:hover {
    border-color: var(--carbon-600);
}

/* ==================== VIEW TRANSITIONS ==================== */
.view-enter {
    animation: viewFadeIn 0.2s ease;
}

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

/* ==================== RESPONSIVE OVERRIDES ==================== */
@media (max-width: 767px) {
    .stat-card {
        padding: 1rem;
    }

    .content-card {
        padding: 1rem;
    }

    .modal-content {
        padding: 1rem;
        max-height: 90vh;
    }

    /* Stack admin exercise form */
    .admin-form-row {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #main-content {
        margin-left: var(--sidebar-width-expanded);
    }

    .sidebar-collapsed ~ #main-content {
        margin-left: var(--sidebar-width-collapsed);
    }
}

@media (min-width: 1024px) {
    .stat-card {
        padding: 1.5rem;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    #top-bar, #sidebar, #mobile-menu, #toast-container,
    .modal-overlay, .btn-primary, .btn-secondary, .btn-danger {
        display: none !important;
    }

    #main-content {
        margin-left: 0 !important;
        padding-top: 0 !important;
    }

    body {
        background: white;
        color: black;
    }
}

/* ==================== FOOTER ==================== */
.app-footer {
    text-align: center;
    padding: 1.5rem 0;
    color: var(--carbon-300);
    font-size: 0.75rem;
    border-top: 1px solid var(--carbon-700);
    margin-top: 2rem;
}

/* Home Gym Phase 2 */
.hg-injury-map-stage {
  aspect-ratio: 3 / 4;
}
.hg-injury-map-image {
  width: 100%;
  max-width: 360px;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
  display: block;
}
.hg-map-dot {
  position: absolute;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 9999px;
  border: 2px solid rgba(255,255,255,.95);
  background: rgba(220,38,38,.25);
  box-shadow: 0 0 14px rgba(220,38,38,.45);
  pointer-events: auto;
}
.hg-map-dot.active {
  background: rgba(220,38,38,.95);
  box-shadow: 0 0 18px rgba(220,38,38,.85);
}

/* Home Gym Phase 2 */
.hg-injury-map-stage { aspect-ratio: 3 / 4; }
.hg-injury-map-image {
  width: 100%;
  max-width: 360px;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
  display: block;
}
.hg-map-dot {
  position: absolute;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 9999px;
  border: 2px solid rgba(255,255,255,.95);
  background: rgba(220,38,38,.25);
  box-shadow: 0 0 14px rgba(220,38,38,.45);
  pointer-events: auto;
}
.hg-map-dot.active {
  background: rgba(220,38,38,.95);
  box-shadow: 0 0 18px rgba(220,38,38,.85);
}

/* Phase 3 — injury map alignment */
.hg-injury-map-stage {
  aspect-ratio: 1 / 1.25;
  min-height: 0 !important;
}
.hg-injury-map-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.hg-body-zone {
  position: absolute;
  top: 5.5%;
  height: 88%;
  width: 34%;
  pointer-events: none;
}
.hg-body-zone-front { left: 15.5%; }
.hg-body-zone-back { left: 50.5%; }
.hg-map-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.9);
  background: rgba(220, 38, 38, .75);
  box-shadow: 0 0 0 4px rgba(220,38,38,.18), 0 8px 18px rgba(0,0,0,.45);
  pointer-events: auto;
}
.hg-map-dot.active {
  background: #fff;
  border-color: #dc2626;
  box-shadow: 0 0 0 5px rgba(220,38,38,.35), 0 0 24px rgba(220,38,38,.65);
}

/* Phase 3.1 — combined front/back injury map, no toggle */
.hg-injury-map-stage {
  aspect-ratio: auto !important;
  min-height: 0 !important;
  line-height: 0;
}
.hg-injury-map-image {
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
}
#hg-injury-map-dots {
  line-height: normal;
}
.hg-map-dot {
  width: 20px !important;
  height: 20px !important;
  transform: translate(-50%, -50%) !important;
  border: 2px solid rgba(255,255,255,.92) !important;
  background: rgba(220,38,38,.72) !important;
  box-shadow: 0 0 0 5px rgba(220,38,38,.16), 0 8px 18px rgba(0,0,0,.45) !important;
}
.hg-map-dot.active {
  background: #dc2626 !important;
  border-color: #fff !important;
  box-shadow: 0 0 0 6px rgba(220,38,38,.35), 0 0 24px rgba(220,38,38,.75) !important;
}


/* Phase 4 — calibrated injury map + larger invisible tap targets */
.hg-map-dot {
  width: 18px !important;
  height: 18px !important;
  z-index: 2;
}
.hg-map-dot::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 9999px;
  background: transparent;
}
.hg-map-dot.active {
  background: #dc2626 !important;
  border-color: #fff !important;
}

/* Phase 6.5 — Community Beautification + UX Overhaul */
.ae-community-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  padding: 10px 0 8px;
  background: linear-gradient(180deg, rgba(8,8,8,.98), rgba(8,8,8,.88) 70%, rgba(8,8,8,0));
  backdrop-filter: blur(10px);
}
.ae-community-topbar #comm-share-btn {
  min-height: 38px;
  border-radius: 999px;
  padding: 9px 14px;
  box-shadow: 0 8px 22px rgba(220,38,38,.20);
}
.ae-community-tabs {
  position: sticky;
  top: 58px;
  z-index: 11;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
  background: rgba(24,24,24,.86);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 28px rgba(0,0,0,.24);
  scrollbar-width: none;
}
.ae-community-tabs::-webkit-scrollbar, .ae-filter-row::-webkit-scrollbar { display:none; }
.ae-community-tabs .comm-tab {
  border: 0 !important;
  border-radius: 13px;
  padding: 10px 14px;
}
.ae-community-tabs .comm-tab.text-\[\#dc2626\] {
  color: #fff !important;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  box-shadow: 0 8px 18px rgba(220,38,38,.22);
}
.ae-community-section { position: relative; padding-bottom: 88px; }
.ae-community-hero {
  padding: 18px !important;
  border-radius: 24px !important;
  background: linear-gradient(145deg, rgba(31,31,31,.96), rgba(18,18,18,.98)) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
}
.ae-community-post-btn {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(220,38,38,.22);
  transition: transform .16s ease, filter .16s ease;
}
.ae-community-post-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ae-filter-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  flex-wrap: nowrap;
}
.ae-filter-row .filter-chip { flex: 0 0 auto; border-radius: 999px; padding: 10px 15px; }
.ae-community-section .content-card[data-hg-post],
.ae-community-section .content-card[data-progress-post] {
  border-radius: 26px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  background: linear-gradient(145deg, rgba(28,28,28,.96), rgba(14,14,14,.98)) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,.28);
}
.ae-community-section img {
  border-radius: 18px !important;
}
.ae-community-fab {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  font-size: 30px;
  line-height: 58px;
  font-weight: 700;
  box-shadow: 0 18px 42px rgba(220,38,38,.35), 0 8px 20px rgba(0,0,0,.4);
  z-index: 20;
}
#hg-admin-moderation { margin-top: 0 !important; }
@media (max-width: 640px) {
  .ae-community-topbar #comm-share-btn { font-size: 0; gap: 0; padding: 10px 12px; }
  .ae-community-topbar #comm-share-btn svg { margin: 0; }
  .ae-community-tabs { top: 54px; margin-left: -2px; margin-right: -2px; }
  .ae-community-hero { padding: 16px !important; }
}

/* Phase 6.7.5 — Built at Home final brand asset fix */
.built-brand-mark{width:32px;height:32px;border-radius:10px;object-fit:contain;display:block;filter:drop-shadow(0 0 10px rgba(224,49,49,.18));}
.built-login-logo{width:220px;max-width:82%;height:auto;margin:0 auto 1.25rem;display:block;}
#built-topbar-logo .built-brand-mark{width:34px;height:34px;}
@media (max-width: 640px){
  .built-login-logo{width:200px;max-width:88%;}
  #built-topbar-logo .built-brand-mark{width:36px;height:36px;}
}

/* Phase 6.7.6 — approved user-provided Built at Home assets */
.built-brand-mark{
  width:34px;
  height:34px;
  border-radius:10px;
  object-fit:contain;
  display:block;
  filter:drop-shadow(0 0 10px rgba(224,49,49,.18));
}
.built-header-logo{
  height:42px;
  width:auto;
  max-width:210px;
  object-fit:contain;
  display:block;
  filter:drop-shadow(0 0 10px rgba(224,49,49,.16));
}
.built-login-logo{
  width:260px;
  max-width:86%;
  height:auto;
  margin:0 auto 1.25rem;
  display:block;
}
#built-topbar-logo .built-header-logo{height:44px;max-width:230px;}
@media(max-width:420px){
  #built-topbar-logo .built-header-logo{height:40px;max-width:200px;}
  .built-login-logo{width:245px;max-width:88%;}
}

/* Built at Home cache bust 6.7.6a 20260524T050414Z */
