:root {
    --primary: #3d8b37;
    --primary-dark: #2e6b2a;
    --primary-light: #e8f5e9;
    --accent: #f9a825;
    --accent-light: #fff8e1;
    --pet-color: #e57373;
    --pet-light: #fce4ec;
    --plant-color: #66bb6a;
    --plant-light: #e8f5e9;
    --text-dark: #1a1a2e;
    --text-muted: #6c757d;
    --border: #e0e0e0;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 32px rgba(0,0,0,0.14);
    --radius: 16px;
    --radius-sm: 10px;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: #f8faf8;
    color: var(--text-dark);
}

/* Navbar */
.navbar-custom {
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 0.75rem 0;
}

.brand-icon { font-size: 1.6rem; }
.brand-text {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.navbar-custom .nav-link {
    color: #444;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s, color 0.2s;
}
.navbar-custom .nav-link:hover { background: var(--primary-light); color: var(--primary); }

.btn-primary-custom {
    background: var(--primary);
    color: #fff !important;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.45rem 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}
.btn-primary-custom:hover { background: var(--primary-dark); transform: translateY(-1px); }

.user-avatar-sm {
    width: 34px; height: 34px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.95rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 40%, #388e3c 70%, #4caf50 100%);
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}
.hero-section::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.04'%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");
}
.hero-section .display-4 { font-weight: 800; color: #fff; }
.hero-section .lead { color: rgba(255,255,255,0.88); }
.hero-emoji { font-size: 5rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2)); }

.hero-search {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-hover);
    max-width: 680px;
}
.hero-search .form-control, .hero-search .form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    font-weight: 600;
    padding: 0.65rem 1rem;
}
.hero-search .form-control:focus, .hero-search .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(61,139,55,0.12);
}

.btn-hero {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.65rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.2s, transform 0.1s;
}
.btn-hero:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }

/* Stats strip */
.stats-strip {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}
.stat-item { text-align: center; }
.stat-number { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* Section headings */
.section-title { font-weight: 800; font-size: 1.75rem; color: var(--text-dark); }
.section-subtitle { color: var(--text-muted); font-size: 1rem; }

/* Listing Cards */
.listing-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
    border: 1px solid var(--border);
    height: 100%;
}
.listing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }

.listing-card .card-img-top {
    height: 200px;
    object-fit: cover;
    background: #f0f4f0;
}
.listing-card .img-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    display: flex; align-items: center; justify-content: center;
    font-size: 4rem;
}

.card-body { padding: 1.25rem; }
.card-title { font-weight: 700; font-size: 1.05rem; color: var(--text-dark); }

.badge-type {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.badge-pet { background: var(--pet-light); color: #c62828; }
.badge-plant { background: var(--plant-light); color: #2e7d32; }

.meta-info { font-size: 0.82rem; color: var(--text-muted); }
.meta-info i { color: var(--primary); }

.btn-card {
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.45rem 1rem;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    display: inline-block;
}
.btn-card:hover { background: var(--primary); color: #fff; }

/* How it works */
.how-it-works { background: var(--primary-light); }
.step-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    height: 100%;
}
.step-icon {
    width: 72px; height: 72px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}
.step-number {
    position: absolute;
    top: -8px; right: -8px;
    width: 28px; height: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}

/* Image drop zone */
.image-drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fafafa;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.25rem;
}
.image-drop-zone:hover {
    border-color: var(--primary);
    background: #f0f4ff;
}

/* Forms */
.form-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.form-label { font-weight: 700; color: var(--text-dark); margin-bottom: 0.4rem; }
.form-control, .form-select, .form-check-input {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm) !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(61,139,55,0.12);
}
.btn-submit {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.7rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
}
.btn-submit:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* Type selector */
.type-selector { display: flex; gap: 1rem; }
.type-option { display: none; }
.type-label {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.5rem; padding: 1rem 2rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
    flex: 1;
    text-align: center;
}
.type-label span { font-size: 2rem; }
.type-option:checked + .type-label {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* Dashboard */
.dashboard-stat {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
}
.dashboard-stat .stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}
.dashboard-stat .stat-val { font-size: 2rem; font-weight: 800; color: var(--primary); }
.dashboard-stat .stat-lbl { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; }

.request-card {
    background: #fff;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 1rem 1.25rem;
    display: flex; align-items: center; gap: 1rem;
    transition: box-shadow 0.2s;
}
.request-card:hover { box-shadow: var(--shadow); }

.status-badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}
.status-pending { background: #fff8e1; color: #f57f17; }
.status-approved { background: var(--plant-light); color: var(--primary-dark); }
.status-rejected { background: #fce4ec; color: #b71c1c; }

/* Details page */
.detail-hero-img {
    border-radius: var(--radius);
    width: 100%;
    height: 340px;
    object-fit: cover;
}
.detail-hero-placeholder {
    border-radius: var(--radius);
    width: 100%;
    height: 340px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    display: flex; align-items: center; justify-content: center;
    font-size: 6rem;
}
.info-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.info-row { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.5rem 0; border-bottom: 1px solid #f0f0f0; }
.info-row:last-child { border-bottom: none; }
.info-icon { color: var(--primary); font-size: 1.1rem; margin-top: 2px; flex-shrink: 0; }
.info-label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.info-value { font-weight: 600; color: var(--text-dark); }

/* Alert */
.alert-custom {
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1rem;
}

/* Auth */
.auth-wrapper {
    min-height: calc(100vh - 120px);
    display: flex; align-items: center; justify-content: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, #f1f8e9, #e8f5e9);
}
.auth-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-hover);
    width: 100%;
    max-width: 440px;
}
.auth-logo { font-size: 3rem; text-align: center; margin-bottom: 0.5rem; }
.auth-title { text-align: center; font-weight: 800; font-size: 1.6rem; color: var(--text-dark); }
.auth-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 1.5rem; }

/* Footer */
.footer-custom {
    background: #fff;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* Filters */
.filter-bar {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}
.filter-pill {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text-muted);
    transition: all 0.18s;
    text-decoration: none;
}
.filter-pill:hover, .filter-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Empty state */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.5; }

/* Responsive */
@media (max-width: 576px) {
    .hero-section { padding: 50px 0 70px; }
    .hero-section .display-4 { font-size: 2rem; }
    .hero-search { padding: 1rem; }
    .form-card, .auth-card { padding: 1.5rem; }
}

/* Chat */
.chat-box {
    background: #f5f7f5;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    min-height: 380px;
    max-height: 500px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.chat-message {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
}
.chat-mine { flex-direction: row-reverse; }
.chat-theirs { flex-direction: row; }

.chat-avatar {
    width: 34px; height: 34px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
    flex-shrink: 0;
}
.avatar-mine { background: #5c6bc0; }

.chat-bubble-wrap { max-width: 72%; display: flex; flex-direction: column; gap: 2px; }
.chat-name { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); padding-left: 4px; }
.chat-bubble {
    padding: 0.6rem 0.9rem;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.5;
    word-break: break-word;
}
.bubble-mine {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.bubble-theirs {
    background: #fff;
    color: var(--text-dark);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}
.chat-time { font-size: 0.7rem; color: var(--text-muted); padding: 0 4px; }

.chat-input-area {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    box-shadow: var(--shadow);
}
.chat-input {
    border: none !important;
    resize: none;
    font-size: 0.95rem;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.25rem 0.5rem;
}
.chat-input:focus { box-shadow: none !important; outline: none; }
.btn-send {
    width: 44px; height: 44px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.1s;
    align-self: flex-end;
}
.btn-send:hover { background: var(--primary-dark); transform: scale(1.05); }
