/* ============================================
   RUNDOUR - Hyper-Local Errand Sharing App
   Comprehensive Stylesheet
   ============================================ */

/* CSS Variables */
:root {
    --primary: #059669;
    --primary-dark: #047857;
    --primary-light: #d1fae5;
    --primary-50: #ecfdf5;
    --secondary: #f59e0b;
    --secondary-light: #fef3c7;
    --accent: #ec4899;
    --accent-light: #fce7f3;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --bg: #f8fafc;
    --bg-alt: #f1f5f9;
    --surface: #ffffff;
    --surface-hover: #f8fafc;

    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --border: #e2e8f0;
    --border-light: #f1f5f9;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

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

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

img {
    max-width: 100%;
    display: block;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.text-inverse { color: var(--text-inverse); }

.bg-primary { background: var(--primary); }
.bg-success { background: var(--success); }
.bg-warning { background: var(--warning); }
.bg-accent { background: var(--accent); }
.bg-danger { background: var(--danger); }

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-alt);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.3);
}

.brand-text {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    background: var(--primary-50);
    color: var(--primary);
}

.nav-link .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--accent);
    color: white;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-profile {
    position: relative;
}

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: var(--transition);
}

.nav-avatar:hover {
    border-color: var(--primary);
}

.nav-profile-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 0.5rem;
    z-index: 1001;
}

.nav-profile-menu a {
    display: block;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-profile-menu a:hover {
    background: var(--bg-alt);
}

.nav-profile-menu .divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

.btn-menu {
    display: none;
    padding: 0.5rem;
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.mobile-menu a {
    display: block;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
}

.mobile-menu a:hover {
    background: var(--bg-alt);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 12px -2px rgba(5, 150, 105, 0.4);
}

.btn-outline {
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}

.btn-ghost {
    color: var(--text-secondary);
    background: transparent;
}

.btn-ghost:hover {
    background: var(--bg-alt);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-icon {
    padding: 0.5rem;
    width: 36px;
    height: 36px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.card-header h3 i {
    color: var(--primary);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 6rem 1.5rem 4rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 8s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--primary-light);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary-light);
    bottom: -10%;
    left: -5%;
    animation-delay: -2s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-light);
    top: 40%;
    left: 30%;
    animation-delay: -4s;
    opacity: 0.3;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    flex: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-50);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid var(--primary-light);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.hero-visual {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    width: 320px;
    height: 640px;
    background: var(--surface);
    border-radius: 2.5rem;
    box-shadow: var(--shadow-xl), 0 0 0 8px rgba(255,255,255,0.5);
    padding: 1rem;
    border: 1px solid var(--border);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.phone-mockup:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.phone-screen {
    height: 100%;
    background: var(--bg);
    border-radius: 2rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mockup-header {
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.mockup-dots {
    display: flex;
    gap: 0.5rem;
}

.mockup-dots span {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
}

.mockup-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.mockup-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
    animation: slideUp 0.5s ease forwards;
    opacity: 0;
}

.mockup-card:nth-child(1) { animation-delay: 0.2s; }
.mockup-card:nth-child(2) { animation-delay: 0.4s; }
.mockup-card:nth-child(3) { animation-delay: 0.6s; }

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

.mockup-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    flex-shrink: 0;
}

.mockup-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mockup-lines .line {
    height: 8px;
    background: var(--bg-alt);
    border-radius: var(--radius-full);
}

.mockup-lines .line.short { width: 40%; }
.mockup-lines .line.long { width: 70%; }

.mockup-badge {
    background: var(--primary-50);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
}

.section-tag {
    display: inline-block;
    background: var(--primary-50);
    color: var(--primary);
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step-card {
    text-align: center;
    padding: 2rem;
    position: relative;
}

.step-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary-light);
    line-height: 1;
    margin-bottom: 1rem;
}

.step-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-50);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: var(--primary);
}

.step-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-50);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 2rem;
    position: relative;
    transition: var(--transition);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), var(--shadow-lg);
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-4px);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.pricing-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.pricing-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pricing-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.pricing-features li i {
    color: var(--success);
    font-size: 0.875rem;
}

/* Security */
.security-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.security-card {
    text-align: center;
    padding: 2rem;
}

.security-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.security-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.security-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Footer */
.footer {
    background: var(--text);
    color: var(--text-inverse);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand .brand-icon {
    background: var(--primary);
}

.footer-brand .brand-text {
    background: none;
    -webkit-text-fill-color: white;
    font-size: 1.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    max-width: 300px;
}

.footer-links h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    color: var(--text-muted);
}

.footer-links a {
    display: block;
    padding: 0.5rem 0;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-visual {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-visual-content {
    position: relative;
    z-index: 1;
    color: white;
    max-width: 400px;
}

.auth-visual-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.auth-visual-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.auth-visual-stats {
    display: flex;
    gap: 2rem;
}

.auth-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,255,255,0.15);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
}

.auth-stat i {
    font-size: 1.25rem;
}

.auth-form-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--bg);
}

.auth-form-wrapper {
    width: 100%;
    max-width: 440px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .brand-icon {
    margin: 0 auto 1rem;
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper > i:first-child {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.input-wrapper input,
.input-wrapper textarea,
.input-wrapper select {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.input-wrapper input:focus,
.input-wrapper textarea:focus,
.input-wrapper select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.input-wrapper input::placeholder,
.input-wrapper textarea::placeholder {
    color: var(--text-muted);
}

.btn-toggle-password {
    position: absolute;
    right: 0.75rem;
    color: var(--text-muted);
    padding: 0.25rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox input:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 0.625rem;
}

.link {
    color: var(--primary);
    font-weight: 500;
    transition: var(--transition);
}

.link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.password-strength {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.strength-bar.active {
    background: var(--primary);
}

.strength-bar.weak { background: var(--danger); }
.strength-bar.medium { background: var(--warning); }
.strength-bar.strong { background: var(--success); }

/* ============================================
   DASHBOARD
   ============================================ */
.page-header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

.page-header.centered {
    text-align: center;
}

.page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.page-header p {
    color: var(--text-secondary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-card {
    padding: 0;
    overflow: hidden;
}

.profile-cover {
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.profile-info {
    padding: 0 1.5rem 1.5rem;
    text-align: center;
    margin-top: -40px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    border: 4px solid var(--surface);
    object-fit: cover;
    margin: 0 auto 0.75rem;
    background: var(--bg-alt);
}

.profile-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.profile-info .text-muted {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.profile-badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.badge-verify {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-verify.verified {
    background: var(--primary-50);
    color: var(--primary);
}

.badge-verify.gold {
    background: var(--secondary-light);
    color: var(--secondary);
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-stat .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.profile-stat .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.menu-card {
    padding: 0.5rem;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.menu-item:hover {
    background: var(--bg-alt);
    color: var(--text);
}

.menu-item.active {
    background: var(--primary-50);
    color: var(--primary);
}

.menu-item .badge {
    margin-left: auto;
    background: var(--accent);
    color: white;
    font-size: 0.625rem;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-icon.bg-primary { background: var(--primary); }
.stat-icon.bg-success { background: var(--success); }
.stat-icon.bg-warning { background: var(--warning); }
.stat-icon.bg-accent { background: var(--accent); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-info .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.stat-info .stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.activity-item:hover {
    background: var(--bg-alt);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.activity-content span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.activity-time {
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ============================================
   EXPLORE / MAP
   ============================================ */
.explore-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    height: calc(100vh - 64px);
    margin-top: 64px;
}

.explore-sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.explore-filters {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.explore-filters h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.explore-filters h3 i {
    color: var(--primary);
}

.filter-group {
    margin-bottom: 1.25rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.range-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--bg-alt);
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.explore-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.explore-map-container {
    position: relative;
    background: var(--bg-alt);
}

.explore-map {
    width: 100%;
    height: 100%;
}

.map-overlay {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 500;
}

.map-overlay .btn {
    background: white;
    box-shadow: var(--shadow-md);
}

/* Errand Cards */
.errand-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: var(--transition);
    cursor: pointer;
}

.errand-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.errand-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.errand-card-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.errand-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.errand-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.errand-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.errand-compensation {
    font-weight: 600;
    color: var(--primary);
}

.errand-urgency {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.urgency-high { background: #fef2f2; color: var(--danger); }
.urgency-medium { background: var(--secondary-light); color: var(--warning); }
.urgency-low { background: var(--primary-50); color: var(--primary); }

/* ============================================
   CREATE ERRAND
   ============================================ */
.create-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

.create-form .card {
    padding: 2rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.form-section h3 i {
    color: var(--primary);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
}

.create-tips {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tips-card h3,
.safety-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.tips-card h3 i { color: var(--secondary); }
.safety-card h3 i { color: var(--danger); }

.tips-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tips-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.tips-list li i {
    color: var(--success);
    font-size: 0.875rem;
}

.safety-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   ERRAND DETAIL
   ============================================ */
.errand-detail {
    max-width: 800px;
    margin: 0 auto;
}

.errand-detail-header {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.errand-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.errand-detail-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.errand-detail-meta > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.errand-detail-meta i {
    color: var(--primary);
}

.errand-detail-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.errand-detail-actions {
    display: flex;
    gap: 1rem;
}

/* Messages */
.messages-container {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.message {
    display: flex;
    gap: 1rem;
    max-width: 80%;
}

.message.own {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.message-content {
    background: var(--bg-alt);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    border-bottom-left-radius: var(--radius-sm);
}

.message.own .message-content {
    background: var(--primary);
    color: white;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-sm);
}

.message-content p {
    font-size: 0.9375rem;
    line-height: 1.5;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.message.own .message-time {
    color: rgba(255,255,255,0.7);
}

.message-input {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.message-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
}

.message-input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ============================================
   COMMUNITY
   ============================================ */
.community-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

.create-post {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.create-post-input {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.create-post-input .post-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.create-post-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.9375rem;
    background: var(--bg);
}

.create-post-input input:focus {
    outline: none;
    border-color: var(--primary);
}

.create-post-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.create-post-actions button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.create-post-actions button:hover {
    background: var(--bg-alt);
    color: var(--primary);
}

.feed-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
}

.post-card:hover {
    box-shadow: var(--shadow-md);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.post-header img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.post-header-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
}

.post-header-info span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.post-content {
    margin-bottom: 1rem;
}

.post-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.post-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.post-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.post-actions button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.post-actions button:hover {
    color: var(--primary);
}

.post-actions button.liked {
    color: var(--accent);
}

.community-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.community-sidebar .card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.community-sidebar .card h3 i {
    color: var(--primary);
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.trending-item:hover {
    background: var(--bg-alt);
}

.trending-rank {
    font-weight: 700;
    color: var(--primary);
    width: 24px;
}

.neighbor-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.neighbor-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.neighbor-item:hover {
    background: var(--bg-alt);
}

.neighbor-item img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.neighbor-item-info {
    flex: 1;
}

.neighbor-item-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
}

.neighbor-item-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.guidelines-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.guidelines-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.guidelines-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--success);
    font-size: 0.75rem;
}

/* ============================================
   INBOX
   ============================================ */
.inbox-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    height: calc(100vh - 200px);
}

.inbox-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    transition: var(--transition);
    width: 100%;
    text-align: left;
}

.tab-btn:hover {
    background: var(--bg-alt);
}

.tab-btn.active {
    background: var(--primary-50);
    color: var(--primary);
}

.inbox-content {
    height: 100%;
    overflow-y: auto;
}

.conversation-list {
    display: flex;
    flex-direction: column;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition);
}

.conversation-item:hover {
    background: var(--bg-alt);
}

.conversation-item.unread {
    background: var(--primary-50);
}

.conversation-item img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-info p {
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ============================================
   PROFILE
   ============================================ */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

.profile-header-card {
    padding: 0;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.profile-cover-photo {
    height: 160px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.profile-header-info {
    padding: 0 2rem 2rem;
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    margin-top: -48px;
    position: relative;
}

.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-full);
    border: 4px solid var(--surface);
    object-fit: cover;
    background: var(--bg-alt);
}

.avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--surface);
    border: 2px solid var(--border);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.profile-header-text {
    flex: 1;
    padding-bottom: 0.5rem;
}

.profile-header-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.profile-header-text p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.profile-header-actions {
    margin-left: auto;
    padding-bottom: 0.5rem;
}

.profile-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0;
}

.profile-tabs .tab-btn {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.profile-tabs .tab-btn.active {
    background: transparent;
    border-bottom-color: var(--primary);
    color: var(--primary);
}

.profile-tab-content {
    min-height: 300px;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.plan-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.plan-badge:contains("Free") {
    background: var(--bg-alt);
    color: var(--text-secondary);
}

.plan-badge:contains("Pro"), .plan-badge:contains("Hero") {
    background: var(--primary-50);
    color: var(--primary);
}

.plan-badge:contains("Champion") {
    background: var(--secondary-light);
    color: var(--secondary);
}

.verification-status {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.verify-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

.verify-item i {
    width: 20px;
    text-align: center;
}

.verify-item span {
    flex: 1;
}

.verify-item .btn {
    margin-left: auto;
}

.profile-stats-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9375rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.profile-stat-row:last-child {
    border-bottom: none;
}

.profile-stat-row span:first-child {
    color: var(--text-secondary);
}

.profile-stat-row span:last-child {
    font-weight: 600;
}

/* ============================================
   SETTINGS
   ============================================ */
.settings-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.settings-content {
    min-height: 400px;
}

.settings-section {
    margin-bottom: 2rem;
}

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

.settings-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info h4 {
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.setting-info p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle {
    position: relative;
    width: 48px;
    height: 26px;
}

.toggle input {
    display: none;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

/* ============================================
   TOASTS
   ============================================ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 1.5rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
}

.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 4.7s forwards;
    font-size: 0.9375rem;
    font-weight: 500;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }

.toast i {
    font-size: 1.125rem;
}

.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }

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

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

/* ============================================
   LOADING
   ============================================ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    z-index: 4000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .steps-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid,
    .security-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .pricing-card.featured {
        transform: none;
    }

    .pricing-card.featured:hover {
        transform: translateY(-4px);
    }

    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        display: none;
    }

    .dashboard-grid,
    .explore-layout,
    .create-layout,
    .community-layout,
    .inbox-layout,
    .profile-layout,
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .explore-layout {
        height: auto;
        display: flex;
        flex-direction: column-reverse;
    }

    .explore-map-container {
        height: 400px;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .btn-menu {
        display: block;
    }

    .steps-grid,
    .features-grid,
    .stats-row {
        grid-template-columns: 1fr;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .profile-header-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-header-actions {
        margin-left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }
}

/* ============================================
   LEAFLET MAP CUSTOMIZATION
   ============================================ */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-lg);
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    width: 280px !important;
}

.map-popup {
    padding: 1rem;
}

.map-popup h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.map-popup p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.map-popup .btn {
    width: 100%;
}

/* Custom Marker */
.custom-marker {
    background: var(--primary);
    border: 3px solid white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.page {
    animation: fadeIn 0.3s ease;
}

/* Errand list in dashboard */
.errand-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* History */
.history-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.history-item:hover {
    box-shadow: var(--shadow-md);
}

.history-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--primary-50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.history-info {
    flex: 1;
}

.history-info h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.history-info p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.history-rating {
    display: flex;
    gap: 0.25rem;
    color: var(--secondary);
}

/* Tab buttons for errands */
.errands-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.errands-tabs .tab-btn {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.errands-tabs .tab-btn.active {
    background: transparent;
    border-bottom-color: var(--primary);
    color: var(--primary);
}

.errands-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Reviews */
.review-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.review-header img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.review-header-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
}

.review-header-info .stars {
    color: var(--secondary);
    font-size: 0.875rem;
}

.review-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Post modal */
.post-modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-modal-form input,
.post-modal-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
}

.post-modal-form input:focus,
.post-modal-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.post-modal-form textarea {
    min-height: 120px;
    resize: vertical;
}

.post-type-select {
    display: flex;
    gap: 0.5rem;
}

.post-type-select button {
    flex: 1;
    padding: 0.625rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.post-type-select button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.post-type-select button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
