:root {
    --font-heading: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --color-primary: #2fb880;
    --color-primary-container: #d7f3e7;
    --color-on-primary: #ffffff;
    --color-surface: #ffffff;
    --color-surface-muted: #f5f8f6;
    --color-surface-variant: #eef4ef;
    --color-outline: rgba(18, 26, 36, 0.12);
    --color-outline-strong: rgba(18, 26, 36, 0.22);
    --color-text: #1c1f24;
    --color-text-muted: #66737d;
    --color-chip-warning: #c84848;
    --color-chip-info: #1a73e8;
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;
    --radius-pill: 999px;
    --radius-full: 999px;
    --shadow-soft: 0 2px 6px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.08);
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --content-max: 960px;
    --mint-500: var(--color-primary);
    --mint-400: #38c890;
    --mint-600: #279865;
    --mint-50: #e9f8f0;
    --mint-25: #f6fcf8;
    --sea-100: #b9f5df;
    --mint-soft: rgba(47, 184, 128, 0.18);
    --text-strong: var(--color-text);
    --text-muted: var(--color-text-muted);
    --surface: var(--color-surface);
    --border: var(--color-outline);
    --shadow: var(--shadow-card);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    line-height: 1.4;
    background-color: var(--color-surface-muted);
    color: var(--text-strong);
    margin: 0;
    min-height: 100%;
    width: 100%;
}

a {
    text-decoration: none;
}

body {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-strong);
    margin: 0 0 var(--space-2);
}

h1 {
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.2;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

h3 {
    font-size: 1.1rem;
    font-weight: 500;
}

p, small, label, button, input, textarea {
    font-family: var(--font-body);
}

small {
    font-size: 0.78rem;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    background: var(--color-surface-muted);
    color: var(--text-strong);
    position: relative;
    width: 100%;
}

.sidebar {
    width: 256px;
    background: var(--surface);
    border-right: 1px solid rgba(28, 31, 36, 0.04);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-height: 100vh;
    position: relative;
    z-index: 10;
    box-shadow: 12px 0 32px rgba(18, 24, 38, 0.05);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
}

.brand.topbar-brand {
    flex: 1;
    justify-content: center;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--mint-500), var(--mint-600));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    box-shadow: 0 12px 24px rgba(55, 211, 153, 0.35);
}

.brand-icon.compact {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

.btn-toggle-mode {
    border-radius: var(--radius-pill);
    border: 1px solid rgba(55, 211, 153, 0.3);
    background: var(--mint-50);
    color: var(--mint-600);
    font-weight: 600;
    padding: 0.4rem 1rem;
    box-shadow: var(--shadow-soft);
    font-size: 0.85rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: var(--radius-pill);
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: 0.2s ease;
    font-size: 0.9rem;
}

.nav-link .nav-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-full);
    background-color: rgba(55, 211, 153, 0.12);
    color: var(--mint-500);
    font-size: 1.15rem;
    border: 1px solid rgba(55, 211, 153, 0.15);
}

.nav-link.active,
.nav-link:hover {
    background-color: var(--mint-50);
    color: var(--mint-500);
    box-shadow: var(--shadow);
}

.nav-link.active .nav-icon,
.nav-link:hover .nav-icon {
    background-color: var(--mint-500);
    color: #fff;
    border-color: transparent;
}

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.mobile-topbar {
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
    background-color: var(--surface);
    position: sticky;
    top: 0;
    z-index: 5;
}

.mobile-topbar .brand small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.icon-button {
    border: 1px solid rgba(55, 211, 153, 0.2);
    background: var(--surface);
    border-radius: 16px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    color: var(--mint-600);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    box-shadow: var(--shadow);
}

.icon-button:focus-visible {
    outline: 2px solid var(--mint-500);
    outline-offset: 2px;
}

.content {
    flex: 1;
    padding: var(--space-5) var(--space-4) calc(var(--space-6) + 72px);
    display: flex;
    justify-content: center;
    width: 100%;
}

.content-inner {
    width: min(var(--content-max), 100%);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding-bottom: var(--space-6);
    margin: 0 auto;
}

@media (min-width: 600px) {
    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .content {
        padding: var(--space-6) var(--space-5) calc(var(--space-6) + 40px);
    }
}

@media (min-width: 900px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .content {
        padding: var(--space-6) var(--space-6) var(--space-6);
    }

    .plant-dashboard {
        flex-direction: row;
        align-items: stretch;
    }

    .plant-hero-card {
        flex: 1 1 auto;
    }
}

@media (max-width: 600px) {
    .content {
        padding: var(--space-4) var(--space-3) calc(var(--space-6) + 64px);
    }

    .plant-hero-card {
        padding: var(--space-3);
        border-radius: var(--radius-md);
    }

    .zone-chip {
        font-size: 0.8rem;
    }

    .plant-card-modern {
        border-radius: var(--radius-md);
    }

    .plant-card-modern img {
        height: 180px;
    }
}

.mobile-nav-overlay {
    display: none;
}

.mobile-bottom-nav {
    display: none;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

.plant-dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.plant-hero-card {
    background: var(--mint-50);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-3);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(55, 211, 153, 0.2);
}

.plant-hero-card h1 {
    font-size: 1.35rem;
    margin-bottom: var(--space-1);
}

.plant-hero-card p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

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

.hero-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-cta {
    display: flex;
    align-items: flex-end;
}

.hero-copy {
    flex: 1;
    min-width: 0;
}

.hero-cta {
    flex-shrink: 0;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    font-weight: 600;
}

.zone-slider {
    width: 100%;
}

.zone-chip-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-2);
    width: 100%;
}

.zone-chip-bar::-webkit-scrollbar {
    display: none;
}

.zone-chip {
    position: relative;
    border-radius: 20px;
    background: #e2f0ea;
    border: none;
    box-shadow: var(--shadow-soft);
    padding: var(--space-2);
    min-height: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    transition: background 0.2s ease, color 0.2s ease;
}

.zone-chip-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.zone-chip-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.zone-chip-icon i {
    font-size: 1.2rem;
    color: var(--mint-600);
}

.zone-chip-label {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

.chip-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--mint-400);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-soft);
}

.zone-chip.active {
    background: var(--mint-500);
    color: #fff;
}

.zone-chip.active .zone-chip-icon {
    background: #fff;
}

.zone-chip.active .chip-badge {
    background: #0f8d5c;
}

@media (max-width: 640px) {
    .zone-chip-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .zone-chip {
        min-height: 150px;
        padding: var(--space-2);
    }
}

.view-toggle-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-1);
}

.btn-pill {
    border-radius: 999px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
}

.btn-compact {
    border-radius: var(--radius-pill);
    padding: 0.4rem 1.1rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.plant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-3);
}

.plant-card-modern {
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(28, 31, 36, 0.05);
    min-height: 100%;
}

.plant-card-modern img {
    height: 160px;
    width: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.plant-card-modern:hover {
    transform: translateY(-4px);
}

.plant-card-body {
    padding: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.plant-card-body small {
    font-size: 0.8rem;
}

.plant-name {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: var(--space-1);
}

.plant-badge {
    padding: 0.25rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--mint-50);
    color: var(--mint-500);
}

.plant-badge.outdoors {
    background: #e0f2fe;
    color: #0f62b6;
}

.next-water {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.plant-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.plant-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.plant-meta > * {
    flex: 0 0 auto;
}

.status-chip {
    border-radius: var(--radius-pill);
    padding: 0.2rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--color-surface-variant);
    color: var(--text-muted);
}

.status-chip.warning {
    background: rgba(200, 72, 72, 0.12);
    color: var(--color-chip-warning);
}

.status-chip.today {
    background: rgba(26, 115, 232, 0.12);
    color: var(--color-chip-info);
}

.ghost-btn {
    border: none;
    background: var(--mint-50);
    border-radius: var(--radius-pill);
    padding: 0.45rem 1.25rem;
    font-weight: 600;
    color: var(--mint-500);
    font-size: 0.85rem;
}

.icon-pill-group {
    display: flex;
    gap: 0.5rem;
}

.icon-pill {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-pill);
    background: var(--surface-muted);
    display: grid;
    place-items: center;
    color: var(--mint-500);
    border: 1px solid rgba(55, 211, 153, 0.15);
}

.icon-pill.danger {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
}

.plant-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
}

.carousel-card {
    min-width: clamp(240px, 70vw, 320px);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #ffffff 0%, #f0fbf8 100%);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    scroll-snap-align: start;
}

.carousel-card img {
    height: 180px;
    width: 100%;
    object-fit: cover;
}

.carousel-body {
    padding: 1.5rem;
}

.carousel-actions {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 992px) {
    .plant-hero-card {
        flex-direction: column;
    }

    .view-toggle-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

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

    .plant-carousel {
        gap: 0.75rem;
    }
}

.more-wrapper {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-soft);
}

.more-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
}

.more-card {
    border-radius: var(--radius-md);
    padding: var(--space-3);
    background: var(--mint-25);
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    border: 1px solid rgba(28, 31, 36, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 140px;
}

.more-card-head {
    display: flex;
    gap: var(--space-2);
    align-items: flex-start;
}

.more-card i {
    font-size: 1.3rem;
    color: var(--mint-600);
}

.more-card:hover {
    transform: translateY(-4px);
    border-color: rgba(55, 211, 153, 0.35);
}

.more-card small,
.more-card-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.dark-mode {
    background: linear-gradient(180deg, #0f172a 0%, #111c34 60%, #0f172a 100%);
    color: #e2e8f0;
}

.dark-mode .sidebar {
    background: linear-gradient(180deg, #161f34 0%, #121a2c 100%);
    border-color: rgba(226, 232, 240, 0.08);
}

.dark-mode .sidebar .nav-link {
    color: #cbd5f5;
}

.dark-mode .sidebar .nav-link .nav-icon {
    background-color: rgba(226, 232, 240, 0.12);
}

.dark-mode .sidebar .nav-link.active,
.dark-mode .sidebar .nav-link:hover {
    background-color: rgba(55, 211, 153, 0.25);
    color: #ffffff;
}

.dark-mode .more-wrapper {
    background: #111c34;
    box-shadow: none;
}

.dark-mode .more-card {
    background: #1a2844;
    border-color: rgba(226, 232, 240, 0.08);
}

.dark-mode .more-card small {
    color: #cbd5f5;
}

.dark-mode .weather-hero-card {
    background: linear-gradient(135deg, rgba(55, 211, 153, 0.25), rgba(15, 23, 42, 0.65));
}

.dark-mode .sunrise-card {
    background: rgba(17, 28, 52, 0.85);
    box-shadow: none;
}

.dark-mode .stat-tile,
.dark-mode .forecast-pill {
    background: rgba(17, 28, 52, 0.85);
    border-color: rgba(226, 232, 240, 0.1);
}

.dark-mode .btn-toggle-mode {
    border-color: rgba(226, 232, 240, 0.25);
    background-color: rgba(226, 232, 240, 0.08);
}

.dark-mode .mobile-topbar {
    background-color: #111c34;
    border-bottom-color: rgba(226, 232, 240, 0.12);
}

.dark-mode .mobile-topbar .icon-button {
    border-color: rgba(226, 232, 240, 0.2);
    color: #e2e8f0;
    background: rgba(17, 28, 52, 0.85);
}

@media (max-width: 992px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(88vw, 320px);
        max-width: 320px;
        border-right: none;
        border-bottom-right-radius: 32px;
        padding: 2rem 1.5rem;
        box-shadow: 24px 0 60px rgba(15, 23, 42, 0.25);
        transform: translateX(-105%);
        transition: transform 0.25s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-header {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .btn-toggle-mode {
        width: 100%;
        justify-content: center;
    }

    .sidebar-nav {
        margin-top: 0.75rem;
    }

    .mobile-topbar {
        display: flex;
    }

    .content {
        padding: 1.25rem 1.25rem 4.5rem;
    }

    .mobile-nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        z-index: 5;
    }

    .mobile-nav-overlay.show {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        bottom: env(safe-area-inset-bottom, 0);
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0));
        z-index: 6;
    }

    .dark-mode .mobile-bottom-nav {
        background: rgba(17, 28, 52, 0.95);
        border-top-color: rgba(226, 232, 240, 0.1);
    }

    .bottom-nav-link {
        border: none;
        background: none;
        text-align: center;
        padding: 0.4rem 0.2rem;
        font-size: 0.75rem;
        color: var(--text-muted);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.15rem;
    }

    .bottom-nav-link i {
        font-size: 1.25rem;
    }

    .bottom-nav-link.active,
    .bottom-nav-link:focus-visible {
        color: var(--mint-600);
    }

    .bottom-nav-link .add-pill {
        width: 48px;
        height: 48px;
        border-radius: 16px;
        background: linear-gradient(135deg, var(--mint-500), var(--mint-600));
        color: #fff;
        display: grid;
        place-items: center;
        box-shadow: 0 10px 30px rgba(55, 211, 153, 0.4);
        margin-top: -1.25rem;
    }

    .dark-mode .bottom-nav-link .add-pill {
        box-shadow: 0 10px 30px rgba(18, 176, 101, 0.35);
    }

}

.card,
.plant-card {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow);
    padding: 1.25rem;
}

.plant-card {
    overflow: hidden;
}

.btn-success,
.btn-primary {
    background-color: var(--mint-500);
    border-color: var(--mint-500);
    color: #fff;
    border-radius: var(--radius-full);
    font-weight: 600;
    padding: 0.65rem 1.75rem;
    box-shadow: var(--shadow);
}

.btn-success:hover,
.btn-primary:hover {
    background-color: var(--mint-600);
    border-color: var(--mint-600);
}

.btn-outline-secondary {
    border-radius: 1rem;
    color: var(--text-muted);
    border-color: var(--border);
}

.btn-outline-danger {
    border-radius: 1rem;
}

.form-control,
.form-select,
.input-group-text {
    border-radius: var(--radius-md);
    border: 1px solid rgba(28, 31, 36, 0.08);
    padding: 0.95rem 1.1rem;
    background-color: var(--surface);
    font-size: 0.95rem;
    box-shadow: var(--shadow);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--mint-500);
    box-shadow: 0 0 0 0.15rem rgba(55, 211, 153, 0.25);
}

.map-picker {
    height: 280px;
    border-radius: 1rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

.location-results .list-group-item {
    border: 1px solid var(--border);
    border-radius: 1rem;
    margin-bottom: 0.45rem;
}

.zone-manager .zone-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.zone-chip {
    padding: 0.45rem 0.95rem;
    background: var(--mint-50);
    color: var(--mint-600);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.location-search .input-group-text {
    background-color: transparent;
    border-right: 0;
}

.location-search .form-control {
    border-left: 0;
}

.badge.bg-success,
.badge.bg-info {
    border-radius: 999px;
    padding: 0.2rem 0.8rem;
    font-weight: 600;
}

.dark-mode .card,
.dark-mode .plant-card,
.dark-mode .content-inner {
    background-color: #11161b;
    color: #f2f6fb;
    box-shadow: none;
}

.dark-mode .form-control,
.dark-mode .form-select {
    background-color: #0d1014;
    color: inherit;
    border-color: rgba(255,255,255,0.15);
}

.dark-mode .btn-outline-secondary {
    border-color: rgba(255,255,255,0.15);
    color: #cdd3df;
}

.plant-detail-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: var(--space-4);
    border: 1px solid rgba(28, 31, 36, 0.05);
}

.plant-detail-card.hero {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.plant-detail-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.plant-detail-header p {
    margin: 0;
    font-size: 0.9rem;
}

@media (min-width: 600px) {
    .plant-detail-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.detail-actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.detail-actions .btn {
    min-height: 40px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    padding: 0.35rem 1.25rem;
}

.detail-hero-img {
    border-radius: var(--radius-md);
    width: 100%;
    object-fit: cover;
    max-height: 240px;
}

.detail-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.stat-chip {
    background: var(--mint-50);
    color: var(--mint-600);
    border-radius: var(--radius-pill);
    padding: 0.35rem 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.85rem;
}

.stat-chip small {
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
}

.detail-chip {
    border-radius: var(--radius-pill);
    border: 1px solid rgba(28, 31, 36, 0.08);
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.detail-list .text-muted {
    font-size: 0.8rem;
}

.climate-card {
    border-radius: var(--radius-md);
    background: var(--mint-50);
    padding: var(--space-3);
}

.climate-card.compact {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.climate-brief {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
}

.climate-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-1);
}

.weather-hero-card {
    background: linear-gradient(135deg, var(--mint-50), #ffffff);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(55, 211, 153, 0.15);
    box-shadow: var(--shadow);
}

.weather-hero {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.weather-hero-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.moon-phase {
    background: rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    padding: 0.75rem 1rem;
    text-align: right;
}

.moon-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sunrise-card {
    display: flex;
    gap: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1.15rem;
    box-shadow: var(--shadow);
}

.weather-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.9rem;
}

.stat-tile {
    background: var(--mint-50);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    box-shadow: var(--shadow);
}

.stat-tile span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.forecast-pill {
    border: 1px solid rgba(28, 31, 36, 0.08);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    background: var(--mint-50);
    box-shadow: var(--shadow);
}

.weather-map {
    min-height: 280px;
}

.weather-location-results .list-group-item {
    border: 1px solid var(--border);
    border-radius: 1rem;
    margin-bottom: 0.4rem;
}

.climate-temp {
    font-size: 2.4rem;
    font-weight: 600;
}

.detail-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-outline);
}

.detail-tab {
    border: none;
    background: transparent;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.detail-tab.active {
    color: var(--mint-600);
    background: var(--mint-50);
}

.care-card,
.requirement-card {
    border-radius: var(--radius-md);
    border: 1px solid rgba(28, 31, 36, 0.06);
    padding: var(--space-3);
    display: flex;
    gap: var(--space-3);
    align-items: center;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.care-icon,
.requirement-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-pill);
    background: var(--mint-50);
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    color: var(--mint-600);
    box-shadow: var(--shadow-soft);
}

.care-icon.watering { color: #3498db; background: rgba(52, 152, 219, 0.1); }
.care-icon.fertilizing { color: #ff9800; background: rgba(255, 152, 0, 0.1); }
.care-icon.care { color: #9c6bff; background: rgba(156, 107, 255, 0.1); }

.info-block {
    border-radius: var(--radius-md);
    border: 1px solid rgba(28, 31, 36, 0.06);
    padding: var(--space-3);
    box-shadow: var(--shadow-soft);
    background: var(--surface);
}

.info-section + .info-section {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
}

.today-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.today-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.today-summary-row {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin: var(--space-3) 0 var(--space-1);
}

.today-summary-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid rgba(28, 31, 36, 0.08);
    padding: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1 1 calc(33.33% - var(--space-2));
    min-width: 120px;
    box-shadow: var(--shadow-soft);
}

.today-summary-card .summary-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--mint-50);
    color: var(--mint-600);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-soft);
}

.today-summary-card.watering .summary-icon {
    background: #e0f2ff;
    color: #0ea5e9;
}

.today-summary-card.fertilizing .summary-icon {
    background: #fff4e0;
    color: #f97316;
}

.today-summary-card.care .summary-icon {
    background: #efe9ff;
    color: #8b5cf6;
}

.summary-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.summary-count {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1;
}

.summary-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-2);
}

@media (min-width: 768px) {
    .today-header h1 {
        font-size: 1.8rem;
    }

    .today-summary-row {
        flex-wrap: nowrap;
    }

    .today-summary-card {
        flex: 1 1 0;
    }
}

.today-section {
    margin-top: var(--space-4);
}

.today-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.section-pill {
    background: var(--mint-50);
    color: var(--mint-600);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.section-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--mint-50);
    color: var(--mint-600);
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    box-shadow: var(--shadow);
}

.today-task-card {
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    padding: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    border: 1px solid rgba(28, 31, 36, 0.06);
}

.task-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
}

.task-lead {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.task-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--color-surface-variant);
}

.task-chip {
    border-radius: var(--radius-full);
    padding: 0.35rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    background-color: var(--mint-50);
    color: var(--mint-600);
}

.task-chip.overdue {
    background-color: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.task-chip.today {
    background-color: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
}

.task-meta.compact {
    background: var(--color-surface-variant);
    border-radius: var(--radius-md);
    padding: var(--space-2);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
}

.task-meta.compact p {
    font-weight: 600;
}

.btn-ghost {
    border-radius: var(--radius-full);
    border-color: rgba(55, 211, 153, 0.25);
    color: var(--mint-600);
    padding: 0.55rem 1.5rem;
}

.timeline-snippet {
    border-radius: 16px;
    background: var(--mint-50);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.ai-card {
    border: 1px dashed rgba(15, 23, 34, 0.15);
}

.ai-item + .ai-item {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(15, 23, 34, 0.08);
}

.chat-panel {
    display: flex;
    flex-direction: column;
}

.chat-history {
    max-height: 520px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-right: 0.25rem;
}

.chat-bubble {
    padding: 0.85rem 1rem;
    border-radius: 16px;
    max-width: 88%;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.chat-bubble.assistant {
    background: var(--mint-50);
    align-self: flex-start;
    border: 1px solid rgba(55, 211, 153, 0.25);
}

.chat-bubble.user {
    background: #fff;
    align-self: flex-end;
}

.chat-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.chat-attachment {
    margin-top: 0.75rem;
    border-radius: 12px;
    max-height: 220px;
    object-fit: cover;
}

.attached-photo img {
    max-height: 200px;
    object-fit: cover;
}

.diagnosis-upload {
    border: 2px dashed rgba(15, 23, 34, 0.15);
    border-radius: 24px;
    padding: 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.diagnosis-upload .placeholder {
    color: var(--text-muted);
    padding: 3rem 0;
}

.diagnosis-upload .placeholder i {
    font-size: 2rem;
    display: block;
}

.diagnosis-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.diagnosis-card {
    border-radius: 22px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 34, 0.08);
}

@media (max-width: 768px) {
    .history-grid {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        flex-direction: column;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .timeline-snippet {
        flex-direction: column;
        align-items: flex-start;
    }

    .diagnosis-upload img {
        max-height: 320px;
        object-fit: cover;
    }

    .zone-pill-group {
        flex-direction: column;
    }

    .lightbox-body {
        max-width: 100%;
        padding: 1rem;
    }

    .plant-card .card-img-top {
        height: 200px;
    }
}
