:root {
    --bg: #eef7ea;
    --bg-deep: #d7ebcd;
    --forest: #1f5d2f;
    --forest-deep: #173f23;
    --grass: #4ea44a;
    --grass-bright: #79c95b;
    --lime: #b7df68;
    --cream: #f7fbf1;
    --text: #18311d;
    --muted: #58755f;
    --line: rgba(31, 93, 47, 0.14);
    --shadow: 0 20px 45px rgba(31, 93, 47, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Outfit", sans-serif;
    color: var(--text);
    background:
        linear-gradient(rgba(249, 255, 246, 0.66), rgba(238, 247, 234, 0.74)),
        url("../images/backgrounds/backgroundImage.avif"),
        radial-gradient(circle at top right, rgba(183, 223, 104, 0.35), transparent 28%),
        radial-gradient(circle at left center, rgba(121, 201, 91, 0.2), transparent 26%),
        linear-gradient(180deg, #f9fff6 0%, var(--bg) 55%, var(--bg-deep) 100%);
    background-size: cover, cover, auto, auto, auto;
    background-attachment: fixed;
}

.page-backdrop {
    position: fixed;
    inset: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.26));
    pointer-events: none;
}

.app-shell {
    position: relative;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1.5rem;
    min-height: 100vh;
    padding: 1.5rem;
}

.sidebar-panel,
.feature-panel,
.table-panel,
.summary-panel,
.stat-panel {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.sidebar-panel {
    padding: 1.75rem;
    background:
        linear-gradient(180deg, rgba(28, 86, 43, 0.98), rgba(53, 133, 60, 0.94)),
        url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1200&q=80");
    background-size: cover;
    background-position: center;
    color: #f4ffef;
}

.brand-mark {
    display: block;
    text-decoration: none;
    color: inherit;
    max-width: 100%;
}

.brand-logo {
    display: block;
    width: 100%;
    max-width: 150px;
    height: auto;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.35rem 0.45rem;
    box-shadow: 0 8px 18px rgba(12, 28, 12, 0.14);
}

.sidebar-copy {
    color: rgba(244, 255, 239, 0.84);
    line-height: 1.6;
}

.sidebar-notes {
    display: grid;
    gap: 0.45rem;
}

.sidebar-notes span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(244, 255, 239, 0.9);
    font-size: 0.92rem;
}

.sidebar-notes span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--lime);
    box-shadow: 0 0 0 4px rgba(183, 223, 104, 0.14);
    flex: 0 0 auto;
}

.tenant-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #f4ffef;
    font-size: 0.82rem;
    font-weight: 700;
}

.nav-stack {
    display: grid;
    gap: 0.8rem;
}

.mobile-sidebar-actions {
    display: none;
    gap: 0.6rem;
}

.nav-chip {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.92rem 1rem;
    border-radius: 16px;
    text-decoration: none;
    color: #f4ffef;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: 180ms ease;
}

.nav-chip:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.main-shell {
    padding: 0.25rem 0 2rem;
}

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

.pwa-install-btn i {
    margin-right: 0.35rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

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

.section-kicker {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--grass);
}

.topbar-title {
    font-size: clamp(2rem, 2.6vw, 3rem);
    font-weight: 800;
}

.pill-chip,
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(78, 164, 74, 0.12);
    color: var(--forest);
    border: 1px solid rgba(78, 164, 74, 0.18);
    font-weight: 600;
}

.feature-panel,
.table-panel,
.summary-panel {
    padding: 1.5rem;
}

.login-shell {
    padding-top: 0.5rem;
}

.auth-photo-panel {
    min-height: 100%;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background:
        linear-gradient(180deg, rgba(16, 47, 20, 0.14), rgba(16, 47, 20, 0.62)),
        url("../images/backgrounds/LoginPageImage.jpeg");
    background-position: center;
    background-size: cover;
    display: flex;
    align-items: end;
}

.auth-photo-copy {
    width: 100%;
    padding: 1.75rem;
    color: #fff;
}

.auth-photo-title {
    font-size: clamp(1.8rem, 2.3vw, 2.4rem);
    font-weight: 800;
}

.auth-form-panel {
    max-width: 540px;
}

.auth-helper {
    display: grid;
    gap: 0.4rem;
}

.status-label {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #f7fbf1;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.stat-panel {
    padding: 1.25rem;
}

.metric-label,
.metric-note,
.text-muted-soft {
    color: var(--muted);
}

.metric-value {
    display: block;
    margin: 0.35rem 0;
    font-size: clamp(1.9rem, 2.6vw, 2.6rem);
    font-weight: 800;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.table-theme {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--line);
    --bs-table-striped-bg: rgba(78, 164, 74, 0.035);
    --bs-table-hover-bg: rgba(78, 164, 74, 0.07);
    margin-bottom: 0;
}

.table-theme thead th {
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    color: var(--muted);
    border-bottom-width: 1px;
}

.customer-row td {
    background: rgba(255, 255, 255, 0.32);
    font-weight: 500;
}

.lawn-subrow td {
    background: rgba(78, 164, 74, 0.035);
}

.subrow-label {
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.yard-photo-panel {
    min-height: 220px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background:
        linear-gradient(180deg, rgba(16, 47, 20, 0.1), rgba(16, 47, 20, 0.42)),
        url("https://images.pexels.com/photos/8469933/pexels-photo-8469933.jpeg?auto=compress&cs=tinysrgb&w=1200");
    background-position: center;
    background-size: cover;
    display: flex;
    align-items: end;
}

.yard-photo-overlay {
    width: 100%;
    padding: 1.4rem;
}

.summary-grid,
.stack-gap {
    display: grid;
    gap: 1rem;
}

.summary-chip {
    padding: 1rem;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #eff8e9);
    border: 1px solid var(--line);
}

.summary-chip span {
    display: block;
    color: var(--muted);
}

.summary-chip strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.9rem;
    overflow-wrap: anywhere;
}

.account-login-grid {
    display: grid;
    gap: 1rem;
}

.account-chip {
    min-width: 0;
}

.account-chip strong {
    font-size: 1.15rem;
    line-height: 1.35;
}

.list-clean {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-clean li + li {
    margin-top: 0.8rem;
}

.list-card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f1f9ec);
    border: 1px solid var(--line);
}

.lawn-card {
    padding: 1rem;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #f3faee);
    border: 1px solid var(--line);
}

.lawn-delete {
    display: inline-flex;
    align-items: center;
}

.lawn-delete input {
    width: auto;
}

.small-link {
    color: var(--forest);
    font-weight: 600;
    text-decoration: none;
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--muted);
}

.lawn-alert {
    border: 1px solid rgba(78, 164, 74, 0.18);
    background: rgba(255, 255, 255, 0.85);
    color: var(--text);
    border-radius: 18px;
}

.btn {
    border-radius: 999px;
    font-weight: 700;
    padding: 0.8rem 1.15rem;
}

.btn-grass {
    background: linear-gradient(135deg, var(--grass), var(--grass-bright));
    color: #fff;
    border: none;
}

.btn-grass:hover,
.btn-grass:focus {
    background: linear-gradient(135deg, #3d9340, #69b852);
    color: #fff;
}

.btn-outline-forest {
    color: var(--forest);
    border: 1px solid rgba(31, 93, 47, 0.2);
    background: rgba(255, 255, 255, 0.55);
}

.btn-outline-forest:hover,
.btn-outline-forest:focus {
    background: rgba(31, 93, 47, 0.08);
    color: var(--forest);
}

.btn-toggle-on {
    color: #fff;
    background: #3f9442;
    border: 1px solid #3f9442;
}

.btn-toggle-on:hover,
.btn-toggle-on:focus {
    color: #fff;
    background: #327734;
}

.btn-toggle-off {
    color: #705f1a;
    background: #f3df92;
    border: 1px solid #e6cf72;
}

.btn-toggle-off:hover,
.btn-toggle-off:focus {
    color: #5a4c14;
    background: #ead377;
}

.btn-delete-soft {
    color: #fff;
    background: #b84b43;
    border: 1px solid #b84b43;
}

.btn-delete-soft:hover,
.btn-delete-soft:focus {
    color: #fff;
    background: #9a3d37;
}

.form-label {
    font-weight: 700;
    color: var(--forest-deep);
}

.form-control,
.form-select,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(31, 93, 47, 0.14);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    padding: 0.85rem 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.form-control:focus,
.form-select:focus,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
select:focus,
textarea:focus {
    border-color: rgba(78, 164, 74, 0.35);
    box-shadow: 0 0 0 0.25rem rgba(78, 164, 74, 0.13);
    outline: 0;
}

.form-check-input {
    border-color: rgba(31, 93, 47, 0.2);
}

.form-check-input:checked {
    background-color: var(--grass);
    border-color: var(--grass);
}

a {
    color: var(--forest);
}

@media (max-width: 991px) {
    .app-shell {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

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

    .topbar,
    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    body {
        background-attachment: scroll;
    }

    .sidebar-panel {
        padding-bottom: 1.4rem;
    }

    .nav-stack {
        display: none;
    }

    .mobile-sidebar-actions {
        display: flex;
        flex-wrap: wrap;
    }

    .mobile-sidebar-actions .btn {
        width: auto;
        border-radius: 999px;
    }

    .main-shell {
        padding-bottom: 6rem;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        z-index: 1050;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.45rem;
        padding: 0.55rem;
        border-radius: 24px;
        background: rgba(23, 63, 35, 0.94);
        box-shadow: 0 20px 40px rgba(19, 43, 22, 0.22);
        backdrop-filter: blur(14px);
    }

    .mobile-nav-link {
        display: grid;
        justify-items: center;
        gap: 0.28rem;
        padding: 0.7rem 0.35rem;
        border-radius: 18px;
        color: rgba(244, 255, 239, 0.8);
        text-decoration: none;
        font-size: 0.72rem;
        font-weight: 700;
        transition: 180ms ease;
    }

    .mobile-nav-link i {
        font-size: 1.05rem;
    }

    .mobile-nav-link.is-active {
        background: rgba(255, 255, 255, 0.14);
        color: #fff;
    }
}

@media (max-width: 575px) {
    .app-shell {
        gap: 1rem;
    }

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

    .sidebar-panel,
    .feature-panel,
    .table-panel,
    .summary-panel,
    .stat-panel {
        border-radius: 22px;
    }

    .auth-photo-copy {
        padding: 1.25rem;
    }

    .sidebar-panel {
        padding: 1.25rem;
    }

    .brand-logo {
        max-width: 125px;
    }

    .topbar-title {
        font-size: 1.75rem;
    }

    .topbar-actions {
        width: 100%;
    }

    .topbar-actions .btn,
    .topbar-actions .pill-chip {
        width: 100%;
        justify-content: center;
    }

    .feature-panel,
    .table-panel,
    .summary-panel,
    .stat-panel {
        padding: 1.2rem;
    }

    .summary-chip strong {
        font-size: 1.15rem;
    }

    .btn {
        width: 100%;
    }

    .section-head .btn,
    .text-end .btn,
    .summary-chip .btn,
    .topbar-actions .btn {
        width: auto;
    }

    .pwa-install-btn {
        width: 100%;
        justify-content: center;
    }

    .mobile-bottom-nav {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        gap: 0.25rem;
        padding: 0.45rem;
        border-radius: 20px;
    }

    .mobile-nav-link {
        padding: 0.62rem 0.2rem;
        font-size: 0.66rem;
    }

    .table-responsive {
        overflow-x: visible;
    }

    .table-card-stack thead {
        display: none;
    }

    .table-card-stack,
    .table-card-stack tbody,
    .table-card-stack tr,
    .table-card-stack td {
        display: block;
        width: 100%;
    }

    .table-card-stack tr {
        margin-bottom: 1rem;
        padding: 0.85rem 0.95rem;
        border-radius: 18px;
        border: 1px solid var(--line);
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 249, 236, 0.96));
    }

    .table-card-stack td {
        padding: 0.55rem 0;
        border: 0;
        text-align: left !important;
    }

    .table-card-stack td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.18rem;
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .table-card-stack td[data-label="Actions"] {
        padding-top: 0.75rem;
    }

    .table-card-stack td[data-label="Actions"]::before {
        margin-bottom: 0.5rem;
    }

    .table-card-stack td[colspan] {
        display: block;
        padding: 1.25rem 0;
        text-align: center !important;
    }

    .table-card-stack td[colspan]::before {
        display: none;
    }

    .table-card-stack td .btn,
    .table-card-stack td form {
        width: 100%;
    }

    .table-card-stack td .btn {
        justify-content: center;
    }

    .table-card-stack td form + .btn,
    .table-card-stack td .btn + form,
    .table-card-stack td form + form,
    .table-card-stack td .btn + .btn {
        margin-top: 0.55rem;
    }

    .table-card-stack .customer-row,
    .table-card-stack .lawn-subrow {
        margin-bottom: 0.85rem;
    }

    .table-card-stack .customer-row td,
    .table-card-stack .lawn-subrow td {
        background: transparent;
    }

    .subrow-label {
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
}
