/**
 * Unfiltered Challenge App - Styles
 * Modern, responsive design with streak animations
 */

/* ============================
   CSS Variables
   ============================ */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --secondary: #64748b;
    --secondary-hover: #475569;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --streak-fire: #ff6b35;
    --water-blue: #0ea5e9;
}

/* ============================
   Reset & Base
   ============================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================
   Layout
   ============================ */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    .main-content {
        padding: 2rem;
    }
}

/* ============================
   Navigation
   ============================ */
.main-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    gap: 1rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text);
    text-decoration: none;
}

.logo-icon, .logo-flame {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--surface-hover);
    color: var(--text);
    text-decoration: none;
}

.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-icon {
    font-size: 1.25rem;
    margin-bottom: 0.125rem;
}

.nav-avatar, .nav-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.nav-avatar-placeholder {
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ============================
   Footer
   ============================ */
.main-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

@media (min-width: 768px) {
    .main-footer {
        position: static;
    }
}

/* ============================
   Buttons
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    text-decoration: none;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--surface-hover);
    text-decoration: none;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    text-decoration: none;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-arrow {
    font-size: 1.125rem;
}

.btn-water {
    background: var(--water-blue);
    color: white;
}

.btn-water:hover {
    background: #0284c7;
}

.btn-water-custom {
    background: var(--surface);
    border: 1px solid var(--water-blue);
    color: var(--water-blue);
}

.btn-mood {
    background: var(--primary-light);
    color: var(--primary);
}

.btn-workout {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-workout:hover {
    background: rgba(239, 68, 68, 0.18);
    text-decoration: none;
}

/* ============================
   Forms
   ============================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select,
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.checkbox-large {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--surface-hover);
    border-radius: var(--radius);
    cursor: pointer;
    margin-bottom: 1.25rem;
    transition: background-color 0.2s;
}

.checkbox-large:hover {
    background: var(--border);
}

.checkbox-large input[type="checkbox"] {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    accent-color: var(--primary);
}

.checkbox-large .checkbox-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.height-inputs {
    display: flex;
    gap: 1rem;
}

.input-with-unit {
    display: flex;
    align-items: center;
    flex: 1;
}

.input-with-unit input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-unit {
    padding: 0.75rem 1rem;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-secondary);
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    opacity: 0.6;
}

.password-toggle:hover {
    opacity: 1;
}

.password-requirements {
    margin-top: 0.5rem;
}

.password-requirements small {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.password-match-indicator {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.password-match-indicator.match {
    color: var(--success);
}

.password-match-indicator.no-match {
    color: var(--danger);
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-preview {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.2s;
}

.file-preview:hover {
    border-color: var(--primary);
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.file-placeholder span {
    display: block;
    font-size: 2rem;
}

.file-placeholder span:last-child {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* ============================
   Alerts & Flash Messages
   ============================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-error {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid #fca5a5;
}

.alert-success {
    background: var(--success-light);
    color: #059669;
    border: 1px solid #6ee7b7;
}

.alert-warning {
    background: var(--warning-light);
    color: #d97706;
    border: 1px solid #fcd34d;
}

.flash-message {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

.flash-success {
    background: var(--success);
    color: white;
}

.flash-error {
    background: var(--danger);
    color: white;
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-1rem);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================
   Auth Pages
   ============================ */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    background:
        linear-gradient(135deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.78)),
        url("https://res.cloudinary.com/dtrk4dyly/image/upload/v1732411428/Generate_a_phone_app_mock_up_that_has_a_calendar_and_checklist_on_two_separate_apps_that_look_minimalistic_ticsxo.jpg") center/cover;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 0, 0, 0.16), transparent 42%),
        radial-gradient(circle at 82% 18%, rgba(255, 0, 0, 0.18), transparent 28%);
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 6px solid #ff0000;
    border-radius: 8px;
    padding: 2.75rem;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(18px);
}

.auth-header {
    text-align: left;
    margin-bottom: 2rem;
}

.auth-logo {
    margin-bottom: 1.25rem;
}

.auth-logo .logo-flame {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    color: #ff0000;
    border-radius: 6px;
    font-size: 1.6rem;
    line-height: 1;
    animation: none;
}

.auth-header h1 {
    color: #151515;
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #666666;
    font-size: 1rem;
    max-width: 320px;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.auth-page .form-group {
    margin-bottom: 1.1rem;
}

.auth-page .form-group label {
    color: #151515;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-page .form-group input {
    min-height: 52px;
    border-radius: 6px;
    border-color: #d8d8d8;
    background: #ffffff;
    color: #151515;
}

.auth-page .form-group input:focus {
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.12);
}

.auth-page .password-toggle {
    color: #151515;
}

.auth-page .password-requirements small {
    color: #666666;
}

.auth-page .btn-primary {
    min-height: 52px;
    background: #ff0000;
    border-radius: 6px;
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(255, 0, 0, 0.22);
}

.auth-page .btn-primary:hover {
    background: #cc0000;
    transform: translateY(-2px);
}

.auth-footer {
    text-align: center;
    color: #666666;
    padding-top: 1.25rem;
    border-top: 1px solid #e8e8e8;
}

.auth-footer a {
    color: #ff0000;
    font-weight: 800;
}

.auth-footer a:hover {
    color: #cc0000;
    text-decoration: none;
}

.auth-page .alert-error {
    background: #fff1f1;
    color: #990000;
    border: 1px solid rgba(255, 0, 0, 0.22);
    border-left: 4px solid #ff0000;
    border-radius: 6px;
}

@media (max-width: 520px) {
    .auth-page {
        padding: 1rem;
        align-items: stretch;
    }

    .auth-container {
        display: flex;
        align-items: center;
    }

    .auth-card {
        width: 100%;
        padding: 2rem 1.35rem;
    }
}

.auth-landing-page {
    display: block;
    min-height: 100vh;
    padding: 0;
    background: #000000;
    color: #ffffff;
    overflow-x: hidden;
    overflow-y: auto;
}

.auth-landing-page::before {
    display: none;
}

.auth-landing-page .navbar {
    height: 80px;
    width: 100%;
    background: #000000;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.auth-landing-page .navbar-container,
.auth-landing-page .footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 50px;
}

.auth-landing-page .navbar-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-landing-page .navbar-logo,
.auth-landing-page .footer-logo {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-decoration: none;
}

.auth-landing-page .nav-menu {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
}

.auth-landing-page .nav-item {
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.auth-landing-page .nav-link {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: #ffffff;
    background: transparent;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
}

.auth-landing-page .nav-link:hover,
.auth-landing-page .nav-link.active {
    color: #ff0000;
    background: transparent;
    text-decoration: none;
}

.auth-landing-page .dropdown-icon {
    width: 0;
    height: 0;
    margin-left: 7px;
    border-top: 4px solid currentColor;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    transition: transform 0.25s ease;
}

.auth-landing-page .dropdown-menu {
    position: absolute;
    top: 80px;
    left: 0;
    min-width: 220px;
    padding: 10px 0;
    background: #000000;
    border-top: 2px solid #ff0000;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
    list-style: none;
}

.auth-landing-page .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.auth-landing-page .dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #ffffff;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

.auth-landing-page .dropdown-menu a:hover,
.auth-landing-page .dropdown-menu a.active {
    color: #ff0000;
    background: rgba(255, 0, 0, 0.1);
    text-decoration: none;
}

.auth-landing-page .donate-btn {
    min-height: 46px;
    margin-left: 14px;
    padding: 12px 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #ff0000;
    border-radius: 6px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(255, 0, 0, 0.22);
    transition: all 0.25s ease;
}

.auth-landing-page .donate-btn:hover {
    background: #cc0000;
    color: #ffffff;
    transform: translateY(-2px);
    text-decoration: none;
}

.auth-landing-page .menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 1002;
}

.auth-landing-page .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background: #ffffff;
    transition: all 0.25s ease;
}

.auth-landing-page.site-menu-open {
    overflow: hidden;
}

.auth-landing-page .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.auth-landing-page .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.auth-landing-page .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.auth-site-navbar {
    height: 80px;
    background: #000000;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 20;
}

.auth-site-nav-inner,
.auth-site-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 50px;
}

.auth-site-nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.auth-site-logo {
    display: inline-flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-decoration: none;
}

.logo-red {
    color: #ff0000;
}

.logo-white {
    color: #ffffff;
}

.auth-site-links {
    display: flex;
    align-items: center;
    gap: 1.35rem;
}

.auth-site-links a,
.auth-site-footer-links a {
    color: rgba(255, 255, 255, 0.76);
    font-weight: 700;
    font-size: 0.94rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

.auth-site-links a:hover,
.auth-site-footer-links a:hover {
    color: #ff0000;
    text-decoration: none;
}

.auth-site-links .auth-donate-link {
    min-height: 44px;
    padding: 0.75rem 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff0000;
    color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 10px 26px rgba(255, 0, 0, 0.22);
}

.auth-site-links .auth-donate-link:hover {
    background: #cc0000;
    color: #ffffff;
    transform: translateY(-2px);
}

.auth-hero {
    min-height: calc(100vh - 80px);
    padding: 82px 50px 72px;
    background: #000000;
    color: #ffffff;
    display: grid;
    align-items: center;
}

.auth-hero-grid {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.03fr) minmax(340px, 0.75fr);
    gap: 70px;
    align-items: center;
}

.auth-hero-copy {
    max-width: 780px;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-eyebrow::before {
    content: "";
    width: 32px;
    height: 2px;
    background: #ff0000;
}

.auth-hero-copy h1 {
    max-width: 780px;
    margin-bottom: 28px;
    color: #ffffff;
    font-size: clamp(3.25rem, 8vw, 7rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: 0;
}

.auth-hero-copy h1 span {
    color: #ff0000;
}

.auth-hero-copy > p:not(.auth-eyebrow) {
    max-width: 690px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.18rem;
}

.auth-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 600px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-hero-stats div {
    padding: 22px 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-hero-stats div:last-child {
    border-right: 0;
}

.auth-hero-stats strong {
    display: block;
    color: #ff0000;
    font-size: 2.2rem;
    line-height: 1;
    margin-bottom: 0.4rem;
}

.auth-hero-stats span {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 800;
}

.auth-landing-page .auth-container {
    max-width: 460px;
    justify-self: end;
}

.auth-landing-page .auth-card {
    width: 100%;
}

.auth-landing-page .auth-header h2 {
    color: #151515;
    font-size: clamp(2rem, 7vw, 2.85rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    margin-bottom: 0.5rem;
}

.auth-landing-page .password-toggle {
    right: 0.9rem;
    color: #666666;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-site-footer {
    padding: 54px 0 30px;
    background: #000000;
    color: #ffffff;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-site-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
}

.auth-site-footer p {
    max-width: 420px;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.62);
}

.auth-site-footer-links {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.auth-landing-page .footer {
    padding: 64px 0 30px;
    background: #000000;
    color: #ffffff;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-landing-page .footer-top {
    display: flex;
    justify-content: space-between;
    gap: 60px;
}

.auth-landing-page .footer-tagline {
    max-width: 360px;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.65);
}

.auth-landing-page .footer-nav {
    display: flex;
    gap: 54px;
    flex-wrap: wrap;
}

.auth-landing-page .footer-nav h3 {
    color: #ff0000;
    font-size: 0.94rem;
    margin-bottom: 18px;
}

.auth-landing-page .footer-nav ul {
    list-style: none;
}

.auth-landing-page .footer-nav li {
    margin-bottom: 10px;
}

.auth-landing-page .footer-nav a,
.auth-landing-page .footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.94rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

.auth-landing-page .footer-nav a:hover,
.auth-landing-page .footer-links a:hover {
    color: #ff0000;
    text-decoration: none;
}

.auth-landing-page .footer-bottom {
    margin-top: 44px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.9rem;
}

.auth-landing-page .footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

@media (max-width: 1040px) {
    .auth-landing-page .navbar-container,
    .auth-landing-page .footer-container {
        padding: 0 24px;
    }

    .auth-landing-page .menu-toggle {
        display: block;
    }

    .auth-landing-page .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%;
        width: min(360px, 100%);
        height: calc(100vh - 80px);
        padding: 22px;
        display: flex;
        flex-direction: column;
        align-items: center;
        background: rgba(0, 0, 0, 0.96);
        overflow-y: auto;
        opacity: 0;
        transition: all 0.25s ease;
        backdrop-filter: blur(5px);
        z-index: 1001;
    }

    .auth-landing-page .nav-menu.active {
        right: 0;
        opacity: 1;
        box-shadow: -24px 0 48px rgba(0, 0, 0, 0.38);
    }

    .auth-landing-page .nav-item {
        display: block;
        height: auto;
        width: 100%;
        margin: 4px 0;
    }

    .auth-landing-page .nav-link {
        height: auto;
        width: 100%;
        padding: 14px 42px 14px 14px;
        justify-content: center;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .auth-landing-page .dropdown-menu {
        position: static;
        min-width: 100%;
        width: 100%;
        max-height: 0;
        padding: 0;
        border-top: 0;
        border-radius: 4px;
        margin-top: 5px;
        box-shadow: none;
        opacity: 0;
        visibility: hidden;
        transform: none;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.05);
        transition: max-height 0.35s ease, opacity 0.25s ease;
    }

    .auth-landing-page .dropdown:hover .dropdown-menu {
        max-height: 0;
        padding: 0;
        opacity: 0;
        visibility: hidden;
    }

    .auth-landing-page .dropdown.active .dropdown-menu {
        max-height: 500px;
        padding: 5px 0;
        opacity: 1;
        visibility: visible;
    }

    .auth-landing-page .dropdown-menu a {
        padding: 12px 15px;
        text-align: center;
    }

    .auth-landing-page .dropdown-icon {
        position: absolute;
        right: 15px;
        top: 50%;
        margin-left: 0;
        border-top-width: 8px;
        border-right-width: 8px;
        border-left-width: 8px;
        transform: translateY(-50%);
        pointer-events: none;
    }

    .auth-landing-page .dropdown.active .dropdown-icon {
        transform: translateY(-50%) rotate(180deg);
    }

    .auth-landing-page .donate-btn {
        margin: 14px 0 0;
    }

    .auth-site-nav-inner,
    .auth-site-footer-inner {
        padding: 0 24px;
    }

    .auth-site-links {
        gap: 1rem;
    }

    .auth-hero {
        padding-left: 24px;
        padding-right: 24px;
    }

    .auth-hero-grid {
        grid-template-columns: 1fr;
        gap: 46px;
    }

    .auth-landing-page .auth-container {
        justify-self: start;
        max-width: 540px;
    }
}

@media (max-width: 720px) {
    .auth-landing-page .navbar {
        height: 72px;
    }

    .auth-landing-page .navbar-logo,
    .auth-landing-page .footer-logo {
        font-size: 1.12rem;
    }

    .auth-landing-page .nav-menu {
        top: 72px;
        height: calc(100vh - 72px);
    }

    .auth-site-navbar {
        height: auto;
    }

    .auth-site-nav-inner {
        min-height: 72px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .auth-site-logo {
        font-size: 1.12rem;
    }

    .auth-site-links {
        width: 100%;
        gap: 0.9rem;
        flex-wrap: wrap;
    }

    .auth-site-links a {
        font-size: 0.86rem;
    }

    .auth-site-links .auth-donate-link {
        min-height: 38px;
        padding: 0.65rem 1rem;
    }

    .auth-hero {
        min-height: auto;
        padding: 54px 22px 64px;
    }

    .auth-hero-copy h1 {
        font-size: clamp(3rem, 17vw, 4.6rem);
    }

    .auth-hero-stats {
        grid-template-columns: 1fr;
    }

    .auth-hero-stats div {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    }

    .auth-hero-stats div:last-child {
        border-bottom: 0;
    }

    .auth-landing-page .auth-container {
        display: block;
        max-width: 100%;
    }

    .auth-site-footer-inner {
        flex-direction: column;
    }

    .auth-landing-page .footer-top,
    .auth-landing-page .footer-bottom {
        flex-direction: column;
    }

    .auth-landing-page .footer-nav {
        width: 100%;
        gap: 34px;
    }
}

/* ============================
   Onboarding Pages
   ============================ */
.onboarding-page {
    min-height: 100vh;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.onboarding-container {
    width: 100%;
    max-width: 500px;
}

.onboarding-container.onboarding-wide {
    max-width: 700px;
}

.onboarding-progress {
    margin-bottom: 2rem;
    text-align: center;
}

.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.onboarding-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.onboarding-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.onboarding-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.onboarding-header p {
    color: var(--text-secondary);
}

.onboarding-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.onboarding-actions.center {
    justify-content: center;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
}

.onboarding-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--surface-hover);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.invite-benefits {
    background: var(--primary-light);
    padding: 1.25rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.invite-benefits h4 {
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.invite-benefits ul {
    list-style: none;
}

.invite-benefits li {
    padding: 0.25rem 0;
    color: var(--text);
}

.calculated-stats {
    background: var(--success-light);
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-top: 1.5rem;
}

.calculated-stats h4 {
    margin-bottom: 1rem;
    color: #059669;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

/* Checklist Explainer */
.checklist-explainer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checklist-item-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface-hover);
    border-radius: var(--radius);
}

.checklist-item-card .item-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.checklist-item-card .item-content h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.checklist-item-card .item-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.checklist-item-card .item-personal {
    color: var(--primary) !important;
    margin-bottom: 0.5rem !important;
}

.streak-info-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-top: 2rem;
}

.streak-info-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.streak-info-header h3 {
    font-size: 1.125rem;
    color: #92400e;
}

.fire-icon {
    font-size: 1.5rem;
}

.streak-info-box ul {
    list-style: none;
}

.streak-info-box li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #78350f;
}

.streak-info-box li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--streak-fire);
}

/* ============================
   Dashboard
   ============================ */
.dashboard {
    max-width: 600px;
    margin: 0 auto;
}

.streak-header {
    text-align: center;
    margin-bottom: 2rem;
}

.streak-display {
    margin-bottom: 1.5rem;
}

.streak-display.completed .streak-flame {
    animation: celebrate 0.5s ease-out;
}

@keyframes celebrate {
    0%, 100% { transform: scale(1) rotate(0); }
    50% { transform: scale(1.3) rotate(5deg); }
}

.streak-flame {
    font-size: 4rem;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.streak-flame.active {
    opacity: 1;
    animation: flicker 1.5s ease-in-out infinite;
}

@keyframes flicker {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.streak-count {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
}

.streak-label {
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.streak-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 1.5rem;
}

.streak-stats .stat {
    text-align: center;
}

.streak-stats .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.streak-stats .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.day-complete-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--success);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.day-complete-badge .badge-icon {
    font-size: 1.25rem;
}

.progress-ring-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-ring {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: conic-gradient(
        var(--primary) calc(var(--progress, 0) * 1%),
        var(--border) calc(var(--progress, 0) * 1%)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-ring::before {
    content: '';
    position: absolute;
    width: 64px;
    height: 64px;
    background: var(--background);
    border-radius: var(--radius-full);
}

.progress-ring .progress-text {
    position: relative;
    font-weight: 700;
    font-size: 1.125rem;
}

.progress-ring[data-progress] {
    --progress: attr(data-progress);
}

.progress-label {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.streak-warning {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.warning-icon {
    font-size: 1.25rem;
}

.time-remaining {
    margin-left: auto;
    font-weight: 600;
    font-family: monospace;
}

/* Checklist Section */
.section-title {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.section-date {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.checklist-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.checklist-item.completed {
    background: var(--success-light);
    border-color: var(--success);
}

.workout-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.workout-summary span {
    color: var(--text);
    font-weight: 600;
}

.checklist-item .item-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.checklist-item .item-content {
    flex: 1;
}

.checklist-item .item-name {
    font-weight: 500;
}

.checklist-item .item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.checklist-item .item-goal {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.item-check {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.item-check.checked {
    background: var(--success);
    border-color: var(--success);
    color: white;
    font-weight: 700;
}

/* Water Tracker */
.water-item {
    cursor: default;
}

.water-progress-bar {
    height: 12px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.water-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--water-blue), #38bdf8);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.water-controls {
    display: flex;
    gap: 0.5rem;
}

/* Mood Display */
.mood-item {
    cursor: default;
}

.mood-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mood-emoji {
    font-size: 1.5rem;
}

.mood-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================
   Modals
   ============================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 200;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 450px;
    max-height: calc(100vh - 120px);
    margin-bottom: 100px;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.125rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
}

/* Mood Selector */
.mood-selector {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.mood-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.mood-option:hover {
    background: var(--surface-hover);
}

.mood-option input {
    display: none;
}

.mood-option .mood-emoji {
    font-size: 2rem;
    opacity: 0.5;
    transition: all 0.2s;
}

.mood-option input:checked ~ .mood-emoji {
    opacity: 1;
    transform: scale(1.2);
}

.mood-option .mood-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ============================
   Celebration Overlay
   ============================ */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
}

.celebration-content {
    text-align: center;
    color: white;
    animation: celebrateIn 0.5s ease;
}

@keyframes celebrateIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.celebration-emoji {
    font-size: 6rem;
    animation: bounce 0.5s ease infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-20px); }
}

.celebration-content h2 {
    font-size: 2.5rem;
    margin: 1rem 0;
}

.celebration-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.streak-update {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.streak-update .fire {
    font-size: 3rem;
}

.streak-update .streak-number {
    font-size: 4rem;
    font-weight: 800;
}

.streak-update .streak-text {
    font-size: 1rem;
    opacity: 0.8;
}

/* ============================
   Circles Page
   ============================ */
.circles-page {
    max-width: 800px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
}

.circles-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.circles-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .circles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.circle-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.circle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.circle-header h3 {
    font-size: 1.125rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.badge-owner {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-you {
    background: var(--success-light);
    color: var(--success);
}

.circle-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.circle-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.circle-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.circle-stats .stat.unread {
    color: var(--primary);
    font-weight: 500;
}

.circle-actions {
    display: flex;
    gap: 0.5rem;
}

.invite-code-display {
    text-align: center;
    margin: 1rem 0;
}

.invite-code-display .code {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--surface-hover);
    border-radius: var(--radius);
    font-size: 1.5rem;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 3px;
}

.invite-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 1rem;
}

.invite-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.invite-section h4 {
    margin-bottom: 1rem;
}

/* ============================
   Chat Page
   ============================ */
.chat-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    max-width: 800px;
    margin: 0 auto;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.back-link {
    font-size: 0.875rem;
}

.circle-info {
    flex: 1;
}

.circle-info h1 {
    font-size: 1.25rem;
    line-height: 1.2;
}

.member-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.empty-chat {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.empty-chat .empty-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.message.own {
    flex-direction: row-reverse;
}

.message-avatar {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: var(--radius-full);
    text-decoration: none;
}

.message-avatar img,
.avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.avatar-placeholder {
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.message-content {
    max-width: 70%;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.message.own .message-header {
    flex-direction: row-reverse;
}

.message-author {
    font-weight: 600;
    font-size: 0.875rem;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

.message-text {
    padding: 0.75rem 1rem;
    background: var(--surface-hover);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    word-wrap: break-word;
}

.message.own .message-text {
    background: var(--primary);
    color: white;
}

.message-form {
    flex-shrink: 0;
}

.message-input-wrapper {
    display: flex;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
}

.message-input-wrapper textarea {
    flex: 1;
    border: none;
    resize: none;
    padding: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    background: transparent;
    min-height: 40px;
    max-height: 120px;
}

.message-input-wrapper textarea:focus {
    outline: none;
}

.btn-send {
    align-self: flex-end;
}

/* Members List */
.members-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius);
}

.member-avatar img,
.member-avatar .avatar-placeholder {
    width: 44px;
    height: 44px;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.member-name {
    font-weight: 500;
}

/* ============================
   Profile Page
   ============================ */
.profile-page {
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 120px;
}

.profile-page .page-header {
    margin-bottom: 1.5rem;
}

.profile-page .page-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.profile-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .profile-grid {
        display: grid;
        grid-template-columns: 340px 1fr;
        align-items: start;
    }
}

@media (min-width: 1024px) {
    .profile-grid {
        grid-template-columns: 380px 1fr;
        gap: 2rem;
    }
}

.profile-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .profile-card {
        padding: 2rem;
        position: sticky;
        top: 1rem;
    }
}

.profile-avatar-section {
    margin-bottom: 1.5rem;
}

.profile-avatar,
.profile-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    object-fit: cover;
    margin: 0 auto 1rem;
}

.profile-avatar-placeholder {
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
}

.profile-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.profile-email {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.profile-stat {
    padding: 0.75rem 0.5rem;
    background: var(--surface-hover);
    border-radius: var(--radius);
}

.profile-stat .stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
}

.profile-stat .stat-label {
    font-size: 0.625rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

@media (min-width: 768px) {
    .profile-stats-grid {
        gap: 0.75rem;
    }
    
    .profile-stat {
        padding: 1rem 0.75rem;
    }
    
    .profile-stat .stat-value {
        font-size: 1.5rem;
    }
    
    .profile-stat .stat-label {
        font-size: 0.6875rem;
    }
}

.profile-joined {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .settings-section {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .settings-card.logout-card {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .settings-section {
        gap: 2rem;
    }
}

.settings-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.settings-card h3 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

/* ============================
   Admin Notifications
   ============================ */
.admin-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.admin-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.admin-eyebrow {
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.admin-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

@media (min-width: 900px) {
    .admin-grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
    }
}

.admin-broadcast-card,
.admin-info-card,
.admin-history-card {
    border: 1px solid var(--border);
}

.admin-device-count {
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 800;
}

.admin-form {
    margin-top: 1.25rem;
}

.admin-form textarea {
    min-height: 140px;
    resize: vertical;
}

.form-help {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-top: 0.5rem;
}

.admin-rule-list {
    display: grid;
    gap: 1rem;
}

.admin-rule-list > div {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.admin-rule-list > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.admin-rule-label {
    color: var(--text-secondary);
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.admin-history-card {
    margin-top: 1rem;
}

.admin-auto-card {
    border: 1px solid var(--border);
    margin-top: 1rem;
}

.admin-section-copy {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.admin-auto-list {
    display: grid;
    gap: 0.75rem;
}

.admin-auto-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

@media (min-width: 780px) {
    .admin-auto-item {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
    }
}

.admin-auto-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.admin-auto-item p,
.admin-auto-item dd {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.45;
}

.admin-auto-item dl {
    display: grid;
    gap: 0.65rem;
    margin: 0;
}

.admin-auto-item dt {
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.admin-auto-item code {
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    display: inline-block;
    font-size: 0.78rem;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 0.2rem 0.35rem;
}

.admin-empty {
    color: var(--text-secondary);
}

.admin-history-list {
    display: grid;
    gap: 0.75rem;
}

.admin-history-item {
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.admin-history-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.admin-history-item p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0.4rem;
}

.admin-history-item span {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.admin-history-stats {
    display: grid;
    grid-template-columns: auto auto;
    gap: 0.15rem 0.45rem;
    min-width: 88px;
    text-align: right;
}

.admin-history-stats strong {
    color: var(--primary);
}

.admin-tools-card {
    border: 1px solid var(--border);
}

.admin-tools-body p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.footer-admin-link {
    color: var(--primary);
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-top: 0.5rem;
    text-decoration: none;
}

@media (max-width: 640px) {
    .admin-header,
    .admin-history-item {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-history-stats {
        text-align: left;
    }
}

/* Collapsible Settings Card */
.settings-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.settings-card-header h3 {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.settings-card-header .btn-edit {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
}

.settings-card-content {
    display: none;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
}

.settings-card.editing .settings-card-content {
    display: block;
}

.settings-card-preview {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
}

.settings-card.editing .settings-card-preview {
    display: none;
}

.preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.preview-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.preview-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.preview-value {
    font-weight: 500;
    font-size: 0.875rem;
}

/* Settings hub */
.settings-hub-page {
    max-width: 720px;
}

.settings-hub-header {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.settings-hub-avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
}

.settings-hub-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.settings-hub-identity h2 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
}

.settings-hub-identity p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.settings-hub-meta {
    margin: 0.35rem 0 0.75rem !important;
    font-size: 0.8125rem !important;
}

.settings-hub-section {
    margin-bottom: 1.5rem;
}

.settings-hub-section-title {
    margin: 0 0 0.5rem;
    padding: 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.settings-hub-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.settings-hub-row {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 0.875rem;
    padding: 0.95rem 1rem;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
}

.settings-hub-row:last-child {
    border-bottom: none;
}

.settings-hub-row:hover {
    background: var(--bg-secondary, rgba(0, 0, 0, 0.02));
}

.settings-hub-row-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-hub-row-copy {
    min-width: 0;
}

.settings-hub-row-label {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
}

.settings-hub-row-subtitle {
    display: block;
    margin-top: 0.15rem;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.settings-hub-row-chevron {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.settings-hub-row-danger .settings-hub-row-icon {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger, #dc2626);
}

.settings-hub-footer {
    margin-top: 1rem;
}

.settings-detail-page {
    max-width: 720px;
}

.settings-detail-header {
    margin-bottom: 1rem;
}

.settings-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.875rem;
}

.settings-back-link [data-lucide] {
    width: 18px;
    height: 18px;
}

.settings-detail-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.settings-detail-card {
    padding: 1.25rem;
}

.settings-detail-form .form-actions {
    margin-top: 1.25rem;
}

.settings-current-photo {
    margin-bottom: 0.75rem;
}

.settings-current-photo img {
    width: 88px;
    height: 88px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

/* Donation Box */
.donation-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fff 100%);
    border: 1px solid #fcd34d;
}

.donation-card .donation-content {
    text-align: center;
}

.donation-card .donation-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    background: #fbbf24;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.donation-card .donation-icon svg,
.donation-card .donation-icon [data-lucide] {
    width: 24px;
    height: 24px;
}

.donation-card h3 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0.5rem;
}

.donation-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.donation-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.donation-actions .btn {
    flex: 1;
    min-width: 120px;
}

.btn-donate {
    background: #fbbf24;
    color: #78350f;
    border: none;
}

.btn-donate:hover {
    background: #f59e0b;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.form-actions .btn {
    flex: 1;
}

.health-info {
    background: var(--surface-hover);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.health-info p {
    margin: 0.5rem 0;
}

.logout-card {
    padding: 1rem;
}

/* ============================
   Responsive Adjustments
   ============================ */
@media (max-width: 640px) {
    .nav-link span:last-child {
        display: none;
    }
    
    .nav-link {
        padding: 0.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .onboarding-actions {
        flex-direction: column;
    }
    
    .action-buttons {
        width: 100%;
    }
    
    .action-buttons .btn {
        flex: 1;
    }
    
    .streak-stats {
        gap: 1.5rem;
    }
    
    .circles-actions {
        flex-direction: column;
    }
    
    .chat-page {
        height: calc(100vh - 150px);
    }
    
    .message-content {
        max-width: 85%;
    }
}

/* ============================
   Utility Classes
   ============================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.hidden { display: none !important; }
.visible { visibility: visible !important; }

/* ============================
   Mood Slider Styles
   ============================ */
.mood-slider-container {
    text-align: center;
    padding: 1rem 0 2rem;
}

.mood-value-display {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: var(--mood-color, #facc15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin: 0 auto 0.5rem;
    transition: background-color 0.3s, background 0.3s;
    box-shadow: var(--shadow);
}

.mood-label-display {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.mood-slider-wrapper {
    padding: 0 0.5rem;
}

.mood-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: var(--radius-full);
    background: linear-gradient(to right, 
        #ef4444 0%, 
        #f97316 11%, 
        #fb923c 22%, 
        #fbbf24 33%, 
        #facc15 44%, 
        #a3e635 55%, 
        #84cc16 66%, 
        #22c55e 77%, 
        #16a34a 88%, 
        #15803d 100%
    );
    outline: none;
    cursor: pointer;
}

.mood-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: white;
    border: 3px solid var(--mood-color, var(--primary));
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.mood-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.mood-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: white;
    border: 3px solid var(--mood-color, var(--primary));
    cursor: pointer;
    box-shadow: var(--shadow);
}

.mood-slider-labels {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.mood-slider-labels span:nth-child(1) { color: #ef4444; }
.mood-slider-labels span:nth-child(2) { color: #f97316; }
.mood-slider-labels span:nth-child(3) { color: #fb923c; }
.mood-slider-labels span:nth-child(4) { color: #fbbf24; }
.mood-slider-labels span:nth-child(5) { color: #facc15; }
.mood-slider-labels span:nth-child(6) { color: #a3e635; }
.mood-slider-labels span:nth-child(7) { color: #84cc16; }
.mood-slider-labels span:nth-child(8) { color: #22c55e; }
.mood-slider-labels span:nth-child(9) { color: #16a34a; }
.mood-slider-labels span:nth-child(10) { color: #15803d; }

.mood-endpoints {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.mood-endpoints .endpoint.low {
    color: #ef4444;
}

.mood-endpoints .endpoint.high {
    color: #15803d;
}

/* Mood Display with Slider Value */
.mood-display-slider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mood-value-badge {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    background-color: var(--mood-color, #facc15);
}

/* Item Subtitle */
.item-subtitle {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ============================
   Insights / Stats Page
   ============================ */
.insights-page,
.journal-history-page {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 120px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header .header-content {
    flex: 1;
}

.page-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
}

/* Range Selector */
.range-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.insight-tabs {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.35rem;
    margin-bottom: 1rem;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
}

.insight-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}

.insight-tab:hover {
    color: var(--primary);
    text-decoration: none;
}

.insight-tab.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.insight-tab svg,
.insight-tab [data-lucide] {
    width: 16px;
    height: 16px;
}

.range-btn {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.range-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

.range-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}

.stat-card .stat-icon {
    font-size: 2rem;
}

.stat-card .stat-info {
    display: flex;
    flex-direction: column;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trend-up {
    color: var(--success) !important;
}

.trend-down {
    color: var(--danger) !important;
}

.trend-stable {
    color: var(--text-secondary) !important;
}

/* Chart Section */
.chart-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.chart-section h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.chart-container {
    height: 300px;
    position: relative;
}

/* Trend Analysis */
.trend-analysis {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.trend-analysis h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    margin-bottom: 1rem;
}

.trend-badge.positive {
    background: var(--success-light);
    color: var(--success);
}

.trend-badge.negative {
    background: var(--danger-light);
    color: var(--danger);
}

.trend-badge.neutral {
    background: var(--surface-hover);
    color: var(--text-secondary);
}

.trend-badge .trend-icon {
    font-size: 1.25rem;
}

.trend-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.insights-actions {
    text-align: center;
}

/* ============================
   Journal History
   ============================ */
.entries-count {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.journal-entries {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.journal-entry {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--surface-hover);
    border-bottom: 1px solid var(--border);
}

.entry-date {
    display: flex;
    flex-direction: column;
}

.entry-date .date-day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.entry-date .date-month {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.entry-mood {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.entry-mood .mood-badge {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

.entry-mood .mood-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.entry-content {
    padding: 1.25rem;
}

.entry-content p {
    line-height: 1.7;
    color: var(--text);
    white-space: pre-wrap;
}

.entry-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
}

.entry-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination-numbers {
    display: flex;
    gap: 0.25rem;
}

.pagination-link {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
}

.pagination-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

.pagination-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: var(--text-secondary);
}

/* Radio Options */
.radio-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--surface-hover);
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.radio-option:hover {
    border-color: var(--primary-light);
}

.radio-option input[type="radio"] {
    margin-top: 0.25rem;
}

.radio-option input[type="radio"]:checked + .radio-label {
    color: var(--primary);
}

.radio-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.radio-label {
    font-weight: 600;
    flex: 1;
    min-width: 150px;
}

.radio-desc {
    width: 100%;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-left: 1.5rem;
}

/* Responsive for insights */
@media (max-width: 640px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card .stat-icon {
        font-size: 1.5rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.25rem;
    }
    
    .entry-mood .mood-label {
        display: none;
    }
    
    .pagination-link.prev,
    .pagination-link.next {
        padding: 0.5rem 0.75rem;
    }
}

/* ============================
   Mobile Header
   ============================ */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
    text-decoration: none;
}

.mobile-logo .logo-icon {
    width: 24px;
    height: 24px;
    color: var(--streak-fire);
}

.mobile-logo:hover {
    text-decoration: none;
}

/* Hide old top nav when bottom nav is active */
.has-bottom-nav .main-nav {
    display: none;
}

/* ============================
   Bottom Navigation Bar
   ============================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
    pointer-events: none;
}

.bottom-nav-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px 24px 0 0;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: none;
    margin: 0;
    pointer-events: auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    min-width: 56px;
    gap: 2px;
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
    transition: all 0.2s ease;
}

.bottom-nav-item span {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.bottom-nav-item:hover {
    color: var(--text);
    text-decoration: none;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active svg {
    stroke-width: 2.5;
}

/* Primary center tab (Daily) */
.bottom-nav-item.primary {
    position: relative;
}

.bottom-nav-item.primary .nav-item-primary {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -20px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transition: all 0.2s ease;
}

.bottom-nav-item.primary .nav-item-primary svg {
    width: 24px;
    height: 24px;
    color: white;
}

.bottom-nav-item.primary:hover .nav-item-primary {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

.bottom-nav-item.primary.active .nav-item-primary {
    background: var(--primary-hover);
}

.bottom-nav-item.primary span {
    margin-top: 4px;
    color: var(--primary);
    font-weight: 600;
}

/* Body padding for bottom nav */
.has-bottom-nav .main-content {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

.has-bottom-nav .main-footer {
    display: none;
}

/* ============================
   Enhanced Mood Slider
   ============================ */
.mood-slider-container {
    text-align: center;
    padding: 1.5rem 0 2.5rem;
}

.mood-slider-container .mood-value-display {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin: 0 auto 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.mood-slider-container .mood-label-display {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2rem;
}

.mood-slider-wrapper {
    padding: 0 1rem;
    position: relative;
}

.mood-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 16px;
    border-radius: var(--radius-full);
    background: linear-gradient(to right, 
        #ef4444 0%, 
        #f97316 11%, 
        #fb923c 22%, 
        #fbbf24 33%, 
        #facc15 44%, 
        #a3e635 55%, 
        #84cc16 66%, 
        #22c55e 77%, 
        #16a34a 88%, 
        #15803d 100%
    );
    outline: none;
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mood-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: white;
    border: 4px solid var(--mood-color, var(--primary));
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 0 4px color-mix(in srgb, var(--mood-color, var(--primary)) 20%, transparent);
    transition: all 0.2s ease;
}

.mood-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), 0 0 0 6px color-mix(in srgb, var(--mood-color, var(--primary)) 25%, transparent);
}

.mood-slider::-webkit-slider-thumb:active {
    transform: scale(1.15);
}

.mood-slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: white;
    border: 4px solid var(--mood-color, var(--primary));
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mood-slider-labels {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0.5rem 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
}

.mood-slider-labels span {
    width: 20px;
    text-align: center;
}

.mood-endpoints {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
    padding: 0 0.25rem;
}

.mood-endpoints .endpoint.low {
    color: #ef4444;
}

.mood-endpoints .endpoint.high {
    color: #15803d;
}

/* ============================
   Journal Page Styles
   ============================ */
.journal-page {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 120px;
}

.journal-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.journal-card-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.journal-card-header h2 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.journal-card-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.journal-textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.journal-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.journal-textarea::placeholder {
    color: var(--text-light);
}

.journal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.journal-actions .btn {
    flex: 1;
}

.external-journal-note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.45;
}

.external-journal-note svg,
.external-journal-note [data-lucide] {
    width: 20px;
    height: 20px;
    color: var(--primary);
    flex: 0 0 auto;
}

.journal-history-link {
    text-align: center;
    padding: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.journal-history-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.journal-history-link a:hover {
    color: var(--primary);
}

.journal-history-link svg {
    width: 18px;
    height: 18px;
}

.danger-zone-card {
    border: 1px solid var(--danger-light);
}

.danger-zone-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.danger-zone-body p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Already logged mood display */
.mood-logged-display {
    text-align: center;
    padding: 2rem 1rem;
}

.mood-logged-badge {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.mood-logged-label {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.mood-logged-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ============================
   Lucide Icon Defaults
   ============================ */
[data-lucide] {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.checklist-item [data-lucide] {
    width: 24px;
    height: 24px;
}

.stat-card [data-lucide] {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

/* ============================
   Mobile Optimizations
   ============================ */
@media (max-width: 768px) {
    html {
        -webkit-tap-highlight-color: transparent;
    }
    
    body {
        -webkit-text-size-adjust: 100%;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    /* Touch-friendly tap targets */
    .btn, button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .checklist-item {
        min-height: 60px;
        padding: 1rem;
    }
    
    /* Prevent zoom on input focus */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px;
    }
    
    /* Better spacing */
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    /* Insights page mobile */
    .insights-page .page-header {
        flex-direction: column;
        text-align: center;
    }
    
    .insights-page .page-header h1 {
        font-size: 1.5rem;
    }
    
    .range-selector {
        justify-content: center;
    }
    
    /* Journal history mobile */
    .journal-history-page .page-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Dashboard mobile */
    .streak-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .streak-stats {
        justify-content: center;
    }
    
    /* Chat page mobile adjustments */
    .chat-page {
        height: calc(100vh - 180px);
        height: calc(100dvh - 180px);
    }
}

/* iOS safe areas */
@supports (padding: max(0px)) {
    .has-bottom-nav .main-content {
        padding-bottom: max(96px, calc(96px + env(safe-area-inset-bottom)));
    }
    
    .bottom-nav {
        padding-bottom: 0;
    }

    .bottom-nav-container {
        padding-bottom: max(8px, calc(8px + env(safe-area-inset-bottom)));
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better focus states for accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================
   Button Icons
   ============================ */
.btn svg,
.btn [data-lucide] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-sm svg,
.btn-sm [data-lucide] {
    width: 16px;
    height: 16px;
}

/* ============================
   Empty State Icons
   ============================ */
.empty-state .empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: var(--radius-full);
}

.empty-state .empty-icon svg,
.empty-state .empty-icon [data-lucide] {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

/* ============================
   Circle Stats Icons
   ============================ */
.circle-stats .stat-icon {
    width: 16px;
    height: 16px;
}

/* ============================
   Celebration Icon
   ============================ */
.celebration-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.celebration-icon svg,
.celebration-icon [data-lucide] {
    width: 80px;
    height: 80px;
    color: var(--warning);
}

.celebration-content .fire {
    display: inline-flex;
}

.celebration-content .fire svg,
.celebration-content .fire [data-lucide] {
    width: 32px;
    height: 32px;
    color: var(--streak-fire);
}

/* ============================
   Streak Flame Icon
   ============================ */
.streak-flame svg,
.streak-flame [data-lucide] {
    width: 48px;
    height: 48px;
    color: var(--text-light);
    transition: all 0.3s;
}

.streak-flame.active svg,
.streak-flame.active [data-lucide] {
    color: var(--streak-fire);
    filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.5));
}

/* ============================
   Warning Icon
   ============================ */
.streak-warning .warning-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* ============================
   Day Complete Badge Icon
   ============================ */
.day-complete-badge .badge-icon {
    width: 24px;
    height: 24px;
}

/* ============================
   Trend Badge Icons
   ============================ */
.trend-badge .trend-icon {
    width: 20px;
    height: 20px;
}

/* ============================
   Chart Header
   ============================ */
.chart-header {
    margin-bottom: 1rem;
}

.chart-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

/* ============================
   77-Day Challenge Styling
   ============================ */
.challenge-number {
    color: #ef4444;
    font-weight: 800;
}

/* Header 77-Day Challenge title */
.mobile-logo .logo-text {
    font-size: 1.1rem;
}

/* 77-Day Progress Card (Insights page) */
.challenge-progress-card {
    background: linear-gradient(135deg, var(--surface) 0%, #fef2f2 100%);
    border: 1px solid #fecaca;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.challenge-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.challenge-progress-header h2 {
    font-size: 1.25rem;
    margin: 0;
}

.challenge-day-badge {
    background: #ef4444;
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
}

.challenge-progress-bar-large {
    margin-top: 1rem;
}

.progress-track {
    height: 16px;
    background: #fee2e2;
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.progress-fill-large {
    height: 100%;
    background: linear-gradient(90deg, #ef4444 0%, #f97316 50%, #22c55e 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.progress-labels .progress-current {
    font-weight: 700;
    color: #ef4444;
}

.challenge-complete-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #dcfce7;
    border-radius: var(--radius);
    color: #16a34a;
    font-weight: 600;
}

.challenge-complete-message svg,
.challenge-complete-message [data-lucide] {
    width: 24px;
    height: 24px;
    color: #16a34a;
}

/* Challenge Dates Section (Settings page) */
.challenge-dates {
    background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.challenge-dates h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.challenge-date-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.challenge-date {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
}

.challenge-date .date-icon {
    width: 20px;
    height: 20px;
    color: #ef4444;
}

.date-info {
    display: flex;
    flex-direction: column;
}

.date-label {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-value {
    font-weight: 600;
    font-size: 0.875rem;
}

.challenge-progress-mini {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar-77 {
    flex: 1;
    height: 8px;
    background: #fee2e2;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill-77 {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #22c55e);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.progress-text-77 {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ef4444;
    white-space: nowrap;
}

/* ============================
   Feed Page Styles
   ============================ */
.feed-page {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
}

.feed-header {
    margin-bottom: 1rem;
}

.feed-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.feed-title-row h1 {
    font-size: 1.5rem;
    margin: 0;
}

.circle-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.circle-tabs::-webkit-scrollbar {
    display: none;
}

.circle-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.circle-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

.circle-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.unread-badge {
    background: #ef4444;
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
}

.circle-tab.active .unread-badge {
    background: white;
    color: var(--primary);
}

.circle-switcher {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.circle-switcher::-webkit-scrollbar {
    display: none;
}

.circle-switcher-item {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.circle-switcher-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

.circle-switcher-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.feed-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

/* Feed Chat Container */
.feed-page .chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-circle-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface-hover);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.chat-circle-name {
    font-weight: 600;
}

.chat-member-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.feed-page .messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.feed-page .message-form {
    flex-shrink: 0;
}

.feed-page .btn-send {
    padding: 0.75rem;
}

.feed-page .btn-send svg,
.feed-page .btn-send [data-lucide] {
    width: 20px;
    height: 20px;
}

/* Empty state actions */
.empty-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Circles Modal */
.modal-large {
    max-width: 500px;
}

.circles-modal-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.circles-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.circle-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface-hover);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s;
}

.circle-list-item:hover {
    background: var(--primary-light);
    text-decoration: none;
}

.circle-list-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.circle-list-name {
    font-weight: 600;
    color: var(--text);
}

.circle-list-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading-spinner svg,
.loading-spinner [data-lucide] {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .feed-page {
        height: calc(100vh - 160px);
        height: calc(100dvh - 160px);
    }
    
    .challenge-date-row {
        flex-direction: column;
    }
    
    .challenge-progress-header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
}

/* ============================
   Info Modal Styles
   ============================ */
.circle-description-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

/* Color Picker Section */
.color-picker-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--surface-hover);
    border-radius: var(--radius);
}

.color-picker-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.color-picker-row input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    padding: 0;
    background: none;
}

.color-picker-row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-row input[type="color"]::-webkit-color-swatch {
    border: 2px solid var(--border);
    border-radius: var(--radius);
}

.color-preview {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border);
}

.color-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Members Section */
.members-section {
    margin-bottom: 1.5rem;
}

.members-section h4 {
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.members-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
}

.member-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--surface-hover);
    border-radius: var(--radius);
}

.member-card .member-avatar {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    text-decoration: none;
}

.member-card .member-avatar img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.member-card .avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.member-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.member-details .member-name {
    font-weight: 500;
}

.member-streak {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
}

.member-streak i {
    width: 0.875rem;
    height: 0.875rem;
}

/* Challenge Status (restart) card */
.challenge-status-card .challenge-status-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    text-align: center;
}

.challenge-status-card .challenge-status-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
}

.challenge-status-card h4 {
    margin: 0;
    font-size: 1rem;
}

.challenge-status-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.restart-bullets {
    margin: 0.75rem 0 1rem;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.restart-bullets li {
    margin-bottom: 0.25rem;
}

/* ===================================================================
 * Streak-broken / lost / never-started banner (dashboard)
 * Persistent, high-visibility alert shown above the daily checklist.
 * =================================================================== */
.streak-broken-banner {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem 1.25rem;
    margin: 1rem 0 1.25rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(249, 115, 22, 0.14));
    border: 2px solid rgba(239, 68, 68, 0.55);
    box-shadow: 0 8px 28px rgba(239, 68, 68, 0.18);
    position: relative;
    animation: streakBannerPulse 2.4s ease-in-out infinite;
}

@keyframes streakBannerPulse {
    0%, 100% { box-shadow: 0 8px 28px rgba(239, 68, 68, 0.18); }
    50%      { box-shadow: 0 8px 36px rgba(239, 68, 68, 0.38); }
}

.streak-broken-banner__glyph {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
}

.streak-broken-banner__glyph i {
    width: 28px;
    height: 28px;
}

.streak-broken-banner__body {
    flex: 1 1 auto;
    min-width: 0;
}

.streak-broken-banner__title {
    margin: 0 0 0.35rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #ef4444;
    line-height: 1.25;
}

.streak-broken-banner__message {
    margin: 0 0 0.9rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.streak-broken-banner__message strong {
    color: #ef4444;
}

.streak-broken-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.streak-broken-banner__form {
    margin: 0;
}

.streak-broken-banner__form .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

@media (max-width: 520px) {
    .streak-broken-banner {
        flex-direction: column;
        align-items: stretch;
    }
    .streak-broken-banner__glyph {
        align-self: flex-start;
    }
    .streak-broken-banner__actions .btn {
        width: 100%;
        justify-content: center;
    }
    .streak-broken-banner__form {
        width: 100%;
    }
}

/* Invite Section */
.invite-section {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.invite-section h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.invite-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.invite-link-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.invite-link-box input {
    flex: 1;
    padding: 0.75rem;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-family: monospace;
    color: var(--text);
}

.invite-link-box .btn {
    flex-shrink: 0;
}

/* Custom bubble color for own messages */
.message.own .message-text {
    color: white;
}

/* Optimistic message styling */
.message.optimistic {
    opacity: 0.7;
}

.message.optimistic .message-time {
    font-style: italic;
}

/* ============================
   System Messages in Feed
   ============================ */
.system-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    margin: 1rem auto;
    max-width: 90%;
    background: var(--surface-hover);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    text-align: center;
}

.system-message svg,
.system-message [data-lucide] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.system-message.system_join {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.system-message.system_join svg,
.system-message.system_join [data-lucide] {
    color: var(--primary);
}

.system-message.system_milestone {
    color: var(--warning);
    background: rgba(234, 179, 8, 0.1);
}

.system-message.system_milestone svg,
.system-message.system_milestone [data-lucide] {
    color: var(--warning);
}


/* ============================
   Midnight Countdown
   ============================ */
.midnight-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface-hover);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

.midnight-countdown svg,
.midnight-countdown [data-lucide] {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* ============================
   Journal History Accordion
   ============================ */
.journal-entries.accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.accordion-item {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.accordion-item .entry-header {
    cursor: pointer;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: background-color 0.2s;
}

.accordion-item .entry-header:hover {
    background: var(--surface-hover);
}

.accordion-item .entry-toggle {
    margin-left: auto;
}

.accordion-item .toggle-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.accordion-item.open .toggle-icon {
    transform: rotate(180deg);
}

.accordion-item .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.open .accordion-content {
    max-height: 1000px;
}

.accordion-item .entry-content {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--border);
}

.accordion-item .entry-content p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    white-space: pre-wrap;
    margin: 1rem 0;
}

.entry-stats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 1rem;
}

.entry-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.75rem;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.entry-stat-pill svg,
.entry-stat-pill [data-lucide] {
    width: 15px;
    height: 15px;
    color: #ef4444;
}

.entry-stat-pill strong {
    color: var(--text);
}

.accordion-item .entry-footer {
    display: flex;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.accordion-item .entry-time {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.accordion-item .entry-time svg,
.accordion-item .entry-time [data-lucide] {
    width: 14px;
    height: 14px;
}

/* ============================
   Streak Break Modal
   ============================ */
.streak-break-modal .modal-content {
    max-width: 420px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.streak-break-content {
    padding: 2rem 1.5rem;
    text-align: center;
}

.streak-break-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.streak-break-icon svg,
.streak-break-icon [data-lucide] {
    width: 40px;
    height: 40px;
    color: #d97706;
}

.streak-break-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.streak-break-message {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.streak-break-info {
    background: var(--surface-hover);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.streak-break-info.lost {
    background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
    border: 1px solid #fecaca;
}

.streak-break-info .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.streak-break-info .info-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.streak-break-info .info-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.streak-break-info .info-value {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.streak-break-hint {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.streak-break-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.streak-break-actions .btn {
    width: 100%;
    justify-content: center;
}

.streak-break-actions .btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1rem;
}

.streak-action-form {
    width: 100%;
}

.streak-action-form .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.streak-action-form .btn svg,
.streak-action-form .btn [data-lucide] {
    width: 20px;
    height: 20px;
}

/* Bottle size preset toggle (profile settings) */
.bottle-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.bottle-toggle-btn {
    flex: 1 1 0;
    min-width: 72px;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 8px;
    background: var(--bg-card, #fff);
    color: var(--text-primary, #111827);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bottle-toggle-btn:hover {
    border-color: var(--primary-color, #6366f1);
    background: var(--bg-hover, #f3f4f6);
}

.bottle-toggle-btn.active {
    border-color: var(--primary-color, #6366f1);
    background: var(--primary-color, #6366f1);
    color: #fff;
}

.bottle-custom-wrap {
    margin-top: 0.5rem;
}

.bottle-custom-wrap[hidden] {
    display: none;
}

/* PWA install settings */
.pwa-install-card {
    border: 1px solid var(--primary-light);
}

.pwa-install-card[hidden],
.pwa-install-card.is-hidden {
    display: none !important;
}

.pwa-install-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pwa-install-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-install-icon svg,
.pwa-install-icon [data-lucide] {
    width: 24px;
    height: 24px;
}

.pwa-install-copy p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.pwa-ios-steps {
    margin: 0.75rem 0 0 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.pwa-ios-steps[hidden] {
    display: none;
}

.pwa-install-body .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pwa-install-body .btn svg,
.pwa-install-body .btn [data-lucide] {
    width: 18px;
    height: 18px;
}

/* Push notification settings */
.notification-status {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface-hover);
    border-radius: var(--radius-full);
    padding: 0.35rem 0.65rem;
}

.notification-card-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-copy {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.notification-config-warning {
    margin: 0;
    line-height: 1.5;
}

.notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.notification-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.notification-actions .btn svg,
.notification-actions .btn [data-lucide] {
    width: 18px;
    height: 18px;
}

/* ============================
   Member Profiles / Cheer
   ============================ */
.member-profile-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 0 2rem;
}

.member-profile-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.member-profile-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 240px;
    padding: 2rem;
    background: linear-gradient(135deg, var(--text) 0%, #1f2937 100%);
    background-size: cover;
    background-position: center;
    color: white;
    overflow: hidden;
}

.member-profile-hero.has-photo {
    min-height: 280px;
}

.member-profile-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.45) 55%,
        rgba(0, 0, 0, 0.2) 100%
    );
    pointer-events: none;
}

.member-profile-hero:not(.has-photo) .member-profile-hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.35) 100%
    );
}

.member-profile-title {
    position: relative;
    z-index: 1;
    min-width: 0;
    width: 100%;
}

.profile-kicker {
    margin: 0 0 0.35rem;
    color: #ff6b6b;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.member-profile-title h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 5vw, 3.75rem);
    line-height: 0.95;
    color: white;
}

.member-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
}

.member-profile-stats .profile-stat {
    background: var(--surface);
    padding: 1.25rem;
    text-align: center;
}

.member-profile-section {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
}

.member-profile-section h2 {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.member-profile-section p {
    margin: 0;
    color: var(--text);
    line-height: 1.7;
}

.member-profile-section.prompt {
    border-left: 4px solid var(--primary);
}

.member-profile-section.empty p {
    color: var(--text-secondary);
}

.cheer-item .item-content {
    gap: 0.6rem;
}

.cheer-open-btn {
    align-self: flex-start;
}

.cheer-member-list {
    display: grid;
    gap: 0.75rem;
}

.cheer-member-row {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}

.cheer-member-row:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.cheer-member-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.cheer-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cheer-member-name {
    font-weight: 700;
}

.cheer-member-action {
    color: var(--primary);
    font-weight: 800;
}

.message-author {
    color: inherit;
    text-decoration: none;
}

.message-author:hover {
    color: var(--primary);
}

@media (max-width: 640px) {
    .member-profile-hero {
        min-height: 220px;
        padding: 1.5rem;
    }

    .member-profile-hero.has-photo {
        min-height: 240px;
    }

    .member-profile-stats {
        grid-template-columns: 1fr;
    }

    .member-profile-section {
        padding: 1.25rem;
    }
}
