:root {
    --gm-leaf: #819d72;
    --gm-leaf-deep: #24492c;
    --gm-mint: #d7e4de;
    --gm-sage: #a8c2bf;
    --gm-slate: #304b5b;
    --gm-night: #18291d;
    --gm-graphite: #4f5b5d;
    --gm-sun: #d59f45;
    --gm-ink: #172016;
    --gm-muted: #66756f;
    --gm-panel: rgba(255, 255, 255, .72);
    --gm-panel-solid: #ffffff;
    --gm-line: rgba(36, 73, 44, .14);
    --gm-shadow: 0 18px 46px rgba(24, 41, 29, .12);
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    color: var(--gm-ink);
    background:
        linear-gradient(135deg, rgba(215, 228, 222, .96) 0%, rgba(168, 194, 191, .58) 42%, rgba(245, 248, 244, .96) 100%);
    background-attachment: fixed;
    text-rendering: geometricPrecision;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(36, 73, 44, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(36, 73, 44, .035) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .14));
}

main.container {
    max-width: 1200px;
}

.gm-navbar {
    background: rgba(24, 41, 29, .92);
    border-bottom: 1px solid rgba(215, 228, 222, .14);
    box-shadow: 0 16px 38px rgba(24, 41, 29, .2);
    backdrop-filter: blur(18px);
}

.navbar-brand {
    letter-spacing: 0;
}

.brand-mark {
    display: inline-grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border: 1px solid rgba(215, 228, 222, .62);
    border-radius: .55rem;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.brand-mark img {
    display: block;
    width: 1.85rem;
    height: 1.85rem;
}

.brand-emblem {
    display: grid;
    width: 4.55rem;
    height: 4.55rem;
    place-items: center;
    border: 1px solid rgba(36, 73, 44, .14);
    border-radius: .65rem;
    background: rgba(255, 255, 255, .72);
    box-shadow: var(--gm-shadow);
    backdrop-filter: blur(16px);
}

.brand-emblem img {
    width: 3.45rem;
    height: 3.45rem;
}

.navbar .nav-link {
    display: inline-flex;
    align-items: center;
    gap: .22rem;
    border: 1px solid transparent;
    border-radius: .55rem;
    padding: .48rem .78rem;
    color: rgba(255, 255, 255, .72);
}

.navbar .nav-link.active,
.navbar .nav-link:hover {
    color: #fff;
    background: rgba(215, 228, 222, .12);
    border-color: rgba(215, 228, 222, .16);
}

.navbar-text {
    color: rgba(255, 255, 255, .8) !important;
}

.language-toggle .btn {
    min-width: 2.75rem;
    font-weight: 800;
}

.language-toggle .btn-light {
    color: var(--gm-night);
    background: var(--gm-mint);
    border-color: var(--gm-mint);
}

.account-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    max-width: 15rem;
}

.account-menu-toggle span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu-toggle.is-active,
.account-menu-toggle.show {
    color: var(--gm-night);
    background: var(--gm-mint);
    border-color: var(--gm-mint);
}

.account-dropdown {
    min-width: 14rem;
    padding: .45rem;
    border: 1px solid rgba(36, 73, 44, .14);
    border-radius: .7rem;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 46px rgba(24, 41, 29, .18);
    backdrop-filter: blur(16px);
}

.account-dropdown .dropdown-header {
    color: var(--gm-muted);
    font-weight: 760;
}

.account-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    border-radius: .5rem;
    font-weight: 720;
}

.account-dropdown .dropdown-item.active,
.account-dropdown .dropdown-item:active {
    color: #fff;
    background: var(--gm-leaf-deep);
}

main.container > .d-flex.justify-content-between.mb-4 {
    position: relative;
    padding: 1.15rem;
    border: 1px solid rgba(36, 73, 44, .12);
    border-radius: .7rem;
    background: rgba(255, 255, 255, .54);
    box-shadow: var(--gm-shadow);
    backdrop-filter: blur(16px);
}

.greenhouse-hero {
    display: grid;
    grid-template-rows: minmax(18rem, 1fr) auto;
    overflow: hidden;
    border: 1px solid rgba(36, 73, 44, .14);
    border-radius: .8rem;
    background: rgba(255, 255, 255, .56);
    box-shadow: var(--gm-shadow);
    backdrop-filter: blur(18px);
}

.greenhouse-scene {
    position: relative;
    min-height: 18rem;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(215, 228, 222, .72), rgba(255, 255, 255, .18) 36%),
        linear-gradient(140deg, rgba(48, 75, 91, .22), transparent 42%),
        linear-gradient(180deg, #dce9e4 0%, #b7cfbd 48%, #5f8a4f 100%);
}

.greenhouse-scene::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,.72) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255,255,255,.52) 1px, transparent 1px);
    background-size: 5.5rem 100%, 100% 3.2rem;
    transform: perspective(28rem) rotateX(52deg) translateY(-5rem);
    transform-origin: top center;
    opacity: .66;
}

.greenhouse-scene::after {
    content: "";
    position: absolute;
    left: -8%;
    right: -8%;
    bottom: -2rem;
    height: 8.5rem;
    background:
        repeating-linear-gradient(95deg, rgba(36, 73, 44, .18) 0 8px, transparent 8px 24px),
        linear-gradient(180deg, rgba(129, 157, 114, .2), rgba(36, 73, 44, .5));
    transform: skewY(-4deg);
}

.greenhouse-roof {
    position: absolute;
    inset: 1rem 2rem auto;
    height: 7rem;
    border: 1px solid rgba(255, 255, 255, .54);
    border-bottom: 0;
    border-radius: .75rem .75rem 0 0;
    opacity: .72;
}

.greenhouse-bed {
    position: absolute;
    bottom: 2.2rem;
    height: 3rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(36, 73, 44, .78), rgba(129, 157, 114, .88));
    box-shadow: 0 16px 38px rgba(36, 73, 44, .2);
}

.bed-one {
    left: 6%;
    width: 43%;
    transform: rotate(-6deg);
}

.bed-two {
    right: 3%;
    width: 48%;
    bottom: 4.2rem;
    transform: rotate(5deg);
}

.bed-three {
    left: 18%;
    width: 72%;
    bottom: .8rem;
    opacity: .72;
}

.hero-health-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(16rem, 76%);
    padding: 1rem;
    border: 1px solid rgba(36, 73, 44, .16);
    border-radius: .75rem;
    background: rgba(255, 255, 255, .68);
    box-shadow: 0 18px 46px rgba(24, 41, 29, .18);
    backdrop-filter: blur(18px);
    transform: translate(-50%, -50%);
}

.hero-health-card strong {
    display: block;
    color: var(--gm-night);
    font-size: 2rem;
    line-height: 1;
}

.hero-progress,
.pot-progress {
    position: relative;
    height: .5rem;
    border-radius: 999px;
    background: rgba(48, 75, 91, .12);
    overflow: hidden;
}

.hero-progress .progress-bar,
.pot-progress .progress-bar {
    position: relative;
    z-index: 2;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gm-leaf-deep), var(--gm-leaf));
}

.pot-target-range {
    position: absolute;
    inset-block: 0;
    z-index: 1;
    border-inline: 1px solid rgba(36, 73, 44, .28);
    background: rgba(36, 73, 44, .16);
}

.hero-copy {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem;
}

.dashboard-widget {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-height: 6.25rem;
    padding: 1rem;
    border: 1px solid rgba(36, 73, 44, .14);
    border-radius: .75rem;
    background: rgba(255, 255, 255, .62);
    box-shadow: var(--gm-shadow);
    backdrop-filter: blur(16px);
}

.widget-icon {
    display: inline-grid;
    width: 2.6rem;
    height: 2.6rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: .65rem;
    color: #fff;
    background: linear-gradient(135deg, var(--gm-leaf-deep), var(--gm-slate));
}

.alert-stack,
.timeline-list {
    display: grid;
    gap: .75rem;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .8rem;
    border: 1px solid rgba(79, 91, 93, .12);
    border-left: .34rem solid var(--gm-task-accent, var(--gm-slate));
    border-radius: .65rem;
    color: #263238;
    background: var(--gm-task-bg, rgba(255, 255, 255, .62));
    box-shadow: 0 12px 28px rgba(24, 41, 29, .08);
}

.task-item .bi {
    display: inline-grid;
    width: 1.75rem;
    height: 1.75rem;
    flex: 0 0 auto;
    place-items: center;
    margin-top: -.08rem;
    border-radius: .5rem;
    color: var(--gm-task-accent, var(--gm-slate));
    background: rgba(255, 255, 255, .72);
}

.task-success {
    --gm-task-accent: #0e7490;
    --gm-task-bg: linear-gradient(135deg, rgba(236, 253, 245, .9), rgba(224, 242, 254, .76));
}

.task-info {
    --gm-task-accent: #4f46e5;
    --gm-task-bg: linear-gradient(135deg, rgba(238, 242, 255, .92), rgba(219, 234, 254, .72));
}

.task-warning {
    --gm-task-accent: #b45309;
    --gm-task-bg: linear-gradient(135deg, rgba(255, 251, 235, .94), rgba(254, 243, 199, .76));
}

.task-danger {
    --gm-task-accent: #be123c;
    --gm-task-bg: linear-gradient(135deg, rgba(255, 241, 242, .94), rgba(254, 226, 226, .72));
}

.pot-mini,
.device-strip {
    padding: 1rem;
    border: 1px solid rgba(36, 73, 44, .14);
    border-radius: .72rem;
    background: rgba(255, 255, 255, .58);
    backdrop-filter: blur(14px);
}

.pot-mini {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    min-height: 13.4rem;
}

.pot-mini.has-profile-art {
    padding-right: clamp(1rem, 39%, 11.5rem);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .72) 0 62%, rgba(247, 250, 248, .18) 62% 100%),
        rgba(255, 255, 255, .58);
}

.pot-mini::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 2;
    width: .35rem;
    background: var(--gm-leaf);
}

.pot-mini-dry::before {
    background: var(--gm-sun);
}

.pot-mini-wet::before {
    background: var(--gm-slate);
}

.pot-mini-muted::before {
    background: rgba(79, 91, 93, .4);
}

.pot-mini > *:not(.pot-profile-art),
.pot-card > .card-body,
.pot-card > .card-footer {
    position: relative;
    z-index: 1;
}

.pot-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.pot-card.has-profile-art {
    background:
        linear-gradient(100deg, rgba(255, 255, 255, .74) 0 67%, rgba(247, 250, 248, .18) 67% 100%),
        rgba(255, 255, 255, .62);
}

.pot-card.has-profile-art .card-body,
.pot-card.has-profile-art .card-footer {
    padding-right: clamp(1rem, 31%, 14rem);
}

.pot-card .card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
}

.pot-profile-art {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: 0;
    width: min(14rem, 30%);
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center;
    opacity: .92;
    filter: saturate(.98) contrast(1.02);
    pointer-events: none;
    user-select: none;
}

.pot-mini .pot-profile-art {
    inset: 0 0 0 auto;
    width: min(10.75rem, 36%);
    height: 100%;
    max-height: none;
    opacity: .94;
}

@media (max-width: 575.98px) {
    .pot-mini.has-profile-art,
    .pot-card.has-profile-art .card-body,
    .pot-card.has-profile-art .card-footer {
        padding-right: 1rem;
    }

    .pot-profile-art {
        width: 42%;
        opacity: .14;
    }

    .pot-mini .pot-profile-art {
        width: 44%;
        opacity: .16;
    }

    .pot-mini-footer span:last-child {
        margin-left: 0;
    }

}

.pot-moisture {
    color: var(--gm-night);
    font-size: 1.45rem;
    font-weight: 850;
    line-height: 1;
}

.pot-mini-header {
    min-height: 2.9rem;
}

.pot-mini-header .fw-bold,
.pot-detail-header .h5 {
    line-height: 1.15;
}

.pot-mini-main {
    min-height: 3rem;
}

.pot-meta-row {
    min-height: 1.7rem;
}

.pot-mini-footer {
    gap: .65rem;
    flex-wrap: wrap;
    line-height: 1.35;
}

.pot-mini-footer span:last-child {
    margin-left: auto;
}

.pot-detail-header {
    min-height: 3rem;
}

.pot-detail-metrics,
.pot-card .pot-meta-row,
.pot-card .pot-progress,
.pot-profile-summary {
    max-width: 34rem;
}

.pot-profile-summary {
    line-height: 1.55;
}

.dashboard-water.is-unavailable,
.manual-water.is-unavailable,
.fertilizer-done.is-unavailable {
    display: none;
}

.pot-setup-action {
    width: fit-content;
    border-color: rgba(79, 91, 93, .26);
    color: var(--gm-graphite);
    background: rgba(255, 255, 255, .56);
}

.pot-health-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 1.55rem;
    padding: .18rem .58rem;
    border: 1px solid rgba(36, 73, 44, .14);
    border-radius: 999px;
    color: var(--gm-graphite);
    background: rgba(255, 255, 255, .7);
    font-size: .78rem;
    font-weight: 760;
    line-height: 1;
}

.pot-health-ok {
    color: var(--gm-leaf-deep);
    border-color: rgba(36, 73, 44, .2);
    background: rgba(129, 157, 114, .16);
}

.pot-health-dry {
    color: #795100;
    border-color: rgba(213, 159, 69, .38);
    background: rgba(213, 159, 69, .2);
}

.pot-health-wet {
    color: var(--gm-slate);
    border-color: rgba(48, 75, 91, .24);
    background: rgba(48, 75, 91, .12);
}

.pot-health-muted {
    color: var(--gm-muted);
    border-color: rgba(79, 91, 93, .18);
    background: rgba(79, 91, 93, .08);
}

.schedule-box {
    padding: .85rem;
    border: 1px solid rgba(36, 73, 44, .12);
    border-radius: .7rem;
    background: rgba(215, 228, 222, .24);
}

.schedule-days {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.schedule-days .btn {
    min-width: 2.35rem;
    border-radius: 999px;
    font-weight: 760;
}

.timeline-item {
    display: flex;
    gap: .72rem;
    align-items: flex-start;
}

.timeline-item .bi {
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: .55rem;
    color: var(--gm-leaf-deep);
    background: rgba(215, 228, 222, .65);
}

.device-strip {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    height: 100%;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 9rem;
    color: var(--gm-muted);
}

.empty-state.small {
    min-height: auto;
    justify-content: flex-start;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--gm-night);
}

.text-muted {
    color: var(--gm-muted) !important;
}

.card {
    border-radius: .7rem;
    border-color: var(--gm-line) !important;
    background: var(--gm-panel);
    box-shadow: var(--gm-shadow) !important;
    backdrop-filter: blur(18px);
}

.card-header {
    border-top-left-radius: .7rem !important;
    border-top-right-radius: .7rem !important;
    border-bottom-color: rgba(36, 73, 44, .1);
    background: rgba(255, 255, 255, .5) !important;
    padding: .9rem 1rem;
}

.card-footer {
    background: transparent !important;
}

.auth-card {
    border-top: .25rem solid var(--gm-leaf-deep) !important;
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card .card-body {
    min-height: 7rem;
}

.stat-icon {
    display: inline-grid;
    width: 2.6rem;
    height: 2.6rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(215, 228, 222, .3);
    border-radius: .62rem;
    color: #fff;
    background: linear-gradient(135deg, var(--gm-leaf-deep), var(--gm-slate));
    box-shadow: 0 12px 26px rgba(36, 73, 44, .22);
}

.stat-value {
    color: var(--gm-night);
    font-size: clamp(1.75rem, 2.4vw, 2.15rem);
    font-weight: 850;
    line-height: 1.05;
}

.label-sub {
    display: block;
    color: var(--gm-muted);
    font-size: .78rem;
    font-weight: 500;
    margin-top: .1rem;
}

.form-label {
    color: #24362c;
    font-weight: 760;
}

.form-control,
.form-select,
.input-group-text {
    border-color: rgba(36, 73, 44, .18);
    border-radius: .58rem;
}

.form-control,
.form-select {
    background-color: rgba(255, 255, 255, .82);
}

.input-group > .form-control:not(:first-child),
.input-group > .form-select:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group-text {
    color: var(--gm-leaf-deep);
    background: rgba(215, 228, 222, .68);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(36, 73, 44, .58);
    box-shadow: 0 0 0 .22rem rgba(129, 157, 114, .2);
}

.btn {
    border-radius: .58rem;
    font-weight: 720;
}

.btn-success {
    --bs-btn-bg: var(--gm-leaf-deep);
    --bs-btn-border-color: var(--gm-leaf-deep);
    --bs-btn-hover-bg: var(--gm-night);
    --bs-btn-hover-border-color: var(--gm-night);
}

.btn-outline-success {
    --bs-btn-color: var(--gm-leaf-deep);
    --bs-btn-border-color: rgba(36, 73, 44, .42);
    --bs-btn-hover-bg: var(--gm-leaf-deep);
    --bs-btn-hover-border-color: var(--gm-leaf-deep);
}

.btn-outline-secondary {
    --bs-btn-color: var(--gm-slate);
    --bs-btn-border-color: rgba(48, 75, 91, .28);
    --bs-btn-hover-bg: var(--gm-slate);
    --bs-btn-hover-border-color: var(--gm-slate);
}

.gm-alert {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    color: var(--gm-alert-text, #263238);
    border: 1px solid var(--gm-alert-border, rgba(79, 91, 93, .16));
    border-left: .38rem solid var(--gm-alert-accent, var(--gm-slate));
    border-radius: .68rem;
    background: var(--gm-alert-bg, rgba(255, 255, 255, .82));
    box-shadow: var(--gm-shadow);
    backdrop-filter: blur(14px);
}

.gm-alert > .bi {
    font-size: 1.15rem;
    margin-top: .1rem;
    color: var(--gm-alert-accent, var(--gm-slate));
}

.gm-alert.alert-success {
    --gm-alert-accent: #0e7490;
    --gm-alert-text: #164e63;
    --gm-alert-border: rgba(14, 116, 144, .24);
    --gm-alert-bg: linear-gradient(135deg, rgba(236, 253, 245, .94), rgba(224, 242, 254, .82));
}

.gm-alert.alert-info {
    --gm-alert-accent: #4f46e5;
    --gm-alert-text: #312e81;
    --gm-alert-border: rgba(79, 70, 229, .24);
    --gm-alert-bg: linear-gradient(135deg, rgba(238, 242, 255, .95), rgba(219, 234, 254, .8));
}

.gm-alert.alert-warning {
    --gm-alert-accent: #b45309;
    --gm-alert-text: #713f12;
    --gm-alert-border: rgba(180, 83, 9, .28);
    --gm-alert-bg: linear-gradient(135deg, rgba(255, 251, 235, .96), rgba(254, 243, 199, .84));
}

.gm-alert.alert-danger {
    --gm-alert-accent: #be123c;
    --gm-alert-text: #881337;
    --gm-alert-border: rgba(190, 18, 60, .26);
    --gm-alert-bg: linear-gradient(135deg, rgba(255, 241, 242, .96), rgba(254, 226, 226, .82));
}

.gm-alert .alert-link {
    color: var(--gm-alert-accent, var(--gm-slate));
    font-weight: 850;
}

.gm-toast {
    border-radius: .68rem;
    box-shadow: 0 16px 38px rgba(24, 41, 29, .26);
}

.gm-toast.text-bg-success {
    background-color: #0e7490 !important;
}

.gm-toast.text-bg-info {
    background-color: #4f46e5 !important;
}

.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table thead th {
    color: #34483d;
    font-size: .82rem;
    font-weight: 850;
    background: rgba(215, 228, 222, .48);
    border-bottom-color: rgba(36, 73, 44, .13);
}

.table td,
.table th {
    vertical-align: middle;
}

.table tbody tr {
    border-color: rgba(36, 73, 44, .08);
}

.table tbody tr:hover {
    background: rgba(215, 228, 222, .28);
}

.badge {
    border-radius: .5rem;
    font-weight: 760;
}

.text-bg-success {
    background-color: var(--gm-leaf-deep) !important;
}

.pot-status {
    min-width: 5.5rem;
}

.pot-card,
.profile-editor {
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.pot-card:hover,
.profile-editor:hover {
    transform: translateY(-2px);
    border-color: rgba(36, 73, 44, .28) !important;
    box-shadow: 0 22px 54px rgba(24, 41, 29, .14) !important;
}

.profile-editor {
    padding: 1rem;
    border: 1px solid rgba(36, 73, 44, .14);
    border-radius: .7rem;
    background: rgba(255, 255, 255, .62);
    backdrop-filter: blur(12px);
}

.profile-grid-card {
    display: flex;
    flex-direction: column;
}

.profile-grid-card form:first-child {
    flex: 1 1 auto;
}

.profile-grid-card .form-label {
    font-size: .78rem;
}

.profile-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    align-items: center;
    justify-content: flex-end;
    padding-top: .35rem;
    margin-top: .25rem;
}

.profile-action-row .btn {
    min-width: 5.35rem;
}

.gm-confirm-modal {
    border: 0;
    border-radius: 1rem;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(245, 250, 247, .94));
    box-shadow: 0 28px 80px rgba(20, 35, 25, .24);
}

.profile-import-textarea {
    min-height: 16rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    line-height: 1.55;
}

.profile-template-box {
    padding: .95rem;
    border: 1px solid rgba(79, 70, 229, .14);
    border-radius: .7rem;
    background:
        linear-gradient(135deg, rgba(238, 242, 255, .8), rgba(255, 255, 255, .62));
}

.profile-template-box pre {
    overflow: auto;
    padding: .85rem;
    border-radius: .58rem;
    color: #263238;
    background: rgba(255, 255, 255, .74);
    font-size: .86rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.profile-search-panel {
    padding: .85rem;
    border: 1px solid rgba(79, 91, 93, .14);
    border-radius: .7rem;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .76), rgba(238, 242, 255, .46));
    box-shadow: 0 12px 28px rgba(24, 41, 29, .08);
}

.profile-search-panel .input-group-text {
    color: #4f46e5;
    background: rgba(238, 242, 255, .78);
}

.profile-view-toggle .btn {
    display: inline-flex;
    gap: .35rem;
    align-items: center;
    font-weight: 760;
}

.profile-pagination-bar {
    padding: .8rem;
    border: 1px solid rgba(36, 73, 44, .1);
    border-radius: .8rem;
    background: rgba(255, 255, 255, .58);
}

.profile-page-status {
    color: var(--gm-muted);
    font-size: .88rem;
    font-weight: 760;
}

.profile-page-size {
    width: 6.5rem;
}

.profile-pagination .page-link {
    min-width: 2rem;
    color: var(--gm-leaf-deep);
    border-color: rgba(36, 73, 44, .16);
    background: rgba(255, 255, 255, .78);
    text-align: center;
}

.profile-pagination .page-link:hover {
    color: #fff;
    background: rgba(36, 73, 44, .86);
}

.profile-pagination .active .page-link {
    color: #fff;
    border-color: var(--gm-leaf-deep);
    background: var(--gm-leaf-deep);
}

.profile-table-panel {
    overflow: hidden;
    border: 1px solid rgba(36, 73, 44, .12);
    border-radius: .85rem;
    background: rgba(255, 255, 255, .64);
}

.profile-table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(215, 228, 222, .3);
}

.profile-table thead th {
    white-space: nowrap;
}

.profile-table tbody td {
    padding-top: .78rem;
    padding-bottom: .78rem;
}

.profile-table-plant {
    display: flex;
    min-width: 13rem;
    gap: .7rem;
    align-items: center;
}

.profile-table-thumb {
    display: grid;
    flex: 0 0 auto;
    width: 2.55rem;
    height: 2.55rem;
    overflow: hidden;
    place-items: center;
    border: 1px solid rgba(36, 73, 44, .12);
    border-radius: .7rem;
    color: var(--gm-leaf-deep);
    background: rgba(215, 228, 222, .58);
}

.profile-table-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-table-note {
    max-width: 15rem;
}

.profile-metric-pill {
    display: inline-flex;
    gap: .35rem;
    align-items: center;
    padding: .24rem .5rem;
    border: 1px solid rgba(14, 116, 144, .14);
    border-radius: 999px;
    color: #164e63;
    background: rgba(224, 242, 254, .72);
    font-size: .82rem;
    font-weight: 760;
    white-space: nowrap;
}

.profile-phase-badge,
.profile-card-phase {
    display: inline-flex;
    width: fit-content;
    gap: .3rem;
    align-items: center;
    border: 1px solid rgba(36, 73, 44, .14);
    border-radius: 999px;
    color: #24492c;
    background: rgba(220, 252, 231, .74);
    font-weight: 800;
}

.profile-phase-badge {
    padding: .28rem .55rem;
}

.profile-card-phase {
    margin-top: .28rem;
    padding: .18rem .48rem;
    font-size: .78rem;
}

.profile-row-actions {
    white-space: nowrap;
}

.profile-compact-card {
    overflow: hidden;
    border: 1px solid rgba(36, 73, 44, .14);
    border-radius: .85rem;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 14px 32px rgba(24, 41, 29, .08);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.profile-compact-card:hover {
    transform: translateY(-2px);
    border-color: rgba(36, 73, 44, .25);
    box-shadow: 0 22px 54px rgba(24, 41, 29, .14);
}

.profile-compact-main {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    color: inherit;
    text-align: left;
    background: transparent;
}

.profile-card-cover {
    display: grid;
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    place-items: center;
    color: var(--gm-leaf-deep);
    font-size: 2rem;
    background:
        linear-gradient(135deg, rgba(215, 228, 222, .82), rgba(255, 247, 237, .72));
}

.profile-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card-body {
    padding: .9rem;
}

.profile-card-body h3 {
    margin: 0;
    color: var(--gm-slate);
    font-size: 1rem;
    font-weight: 850;
}

.profile-card-body p {
    display: -webkit-box;
    min-height: 2.35rem;
    margin: .2rem 0 0;
    overflow: hidden;
    color: var(--gm-muted);
    font-size: .82rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.profile-card-status {
    flex: 0 0 auto;
    width: 2.05rem;
    height: 1.05rem;
    border-radius: 999px;
    background: #94a3b8;
    box-shadow: inset 0 0 0 .28rem rgba(255, 255, 255, .52);
}

.profile-card-status.is-on {
    background: #10b981;
}

.profile-card-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .8rem;
}

.profile-card-metrics span {
    display: inline-flex;
    gap: .3rem;
    align-items: center;
    padding: .25rem .5rem;
    border-radius: 999px;
    color: #24492c;
    background: rgba(215, 228, 222, .72);
    font-size: .8rem;
    font-weight: 760;
}

.profile-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    padding: .75rem .9rem .9rem;
    border-top: 1px solid rgba(36, 73, 44, .08);
}

.profile-preview-image {
    display: grid;
    width: 100%;
    min-height: 13rem;
    overflow: hidden;
    place-items: center;
    border: 1px solid rgba(36, 73, 44, .12);
    border-radius: .9rem;
    color: var(--gm-leaf-deep);
    font-size: 3rem;
    background: rgba(215, 228, 222, .5);
}

.profile-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}

.profile-preview-grid div,
.profile-preview-note {
    padding: .75rem;
    border: 1px solid rgba(36, 73, 44, .1);
    border-radius: .75rem;
    background: rgba(255, 255, 255, .68);
}

.profile-preview-grid span,
.profile-preview-note span {
    display: block;
    color: var(--gm-muted);
    font-size: .78rem;
    font-weight: 760;
}

.profile-preview-grid strong {
    display: block;
    margin-top: .12rem;
    color: var(--gm-slate);
    font-size: 1.05rem;
}

.profile-preview-note p {
    margin: .25rem 0 0;
    color: var(--gm-slate);
}

.profile-image-box {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid rgba(36, 73, 44, .14);
    border-radius: .7rem;
    background: rgba(215, 228, 222, .45);
}

.profile-image-box img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-image-fallback {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: var(--gm-leaf-deep);
    font-size: 2rem;
    background:
        linear-gradient(135deg, rgba(215, 228, 222, .9), rgba(168, 194, 191, .55));
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.icon-title {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.icon-title .bi {
    color: var(--gm-leaf-deep);
}

.action-button {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
}

.sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    padding: 1rem 0;
    background: linear-gradient(180deg, rgba(238, 245, 240, 0), rgba(238, 245, 240, .92) 35%);
    backdrop-filter: blur(8px);
}

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

.camera-card,
.camera-live-panel {
    overflow: hidden;
    border: 1px solid rgba(36, 73, 44, .14);
    border-radius: .8rem;
    background: rgba(255, 255, 255, .72);
    box-shadow: var(--gm-shadow);
    backdrop-filter: blur(16px);
}

.camera-preview {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(215, 228, 222, .86), rgba(255, 255, 255, .56));
}

.camera-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}

.camera-card:hover .camera-preview img {
    transform: scale(1.025);
}

.camera-placeholder,
.camera-empty-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: .65rem;
    color: rgba(36, 73, 44, .68);
    background:
        radial-gradient(circle at 50% 35%, rgba(129, 157, 114, .18), transparent 34%),
        linear-gradient(135deg, rgba(215, 228, 222, .9), rgba(255, 255, 255, .62));
}

.camera-placeholder .bi,
.camera-empty-overlay .bi {
    font-size: 2.4rem;
}

.camera-card-body {
    padding: 1rem;
}

.camera-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.camera-meta-grid div,
.camera-info-list > div {
    padding: .72rem;
    border: 1px solid rgba(36, 73, 44, .1);
    border-radius: .65rem;
    background: rgba(255, 255, 255, .58);
}

.camera-meta-grid span,
.camera-info-list span {
    display: block;
    color: var(--gm-muted);
    font-size: .78rem;
    font-weight: 700;
}

.camera-meta-grid strong,
.camera-info-list strong {
    display: block;
    margin-top: .18rem;
    overflow: hidden;
    color: var(--gm-ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.camera-edit-form {
    padding-top: .85rem;
    border-top: 1px solid rgba(36, 73, 44, .12);
}

.camera-control-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.camera-control-strip .form-select {
    width: 5.25rem;
}

.camera-live-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(36, 73, 44, .12);
}

.camera-latest-frame {
    position: relative;
    display: grid;
    min-height: 22rem;
    place-items: center;
    background: #111812;
}

.camera-latest-frame img {
    width: 100%;
    height: 100%;
    min-height: 22rem;
    object-fit: contain;
    display: block;
}

.camera-info-list {
    display: grid;
    gap: .75rem;
}

.camera-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    gap: .75rem;
}

.camera-thumb {
    display: grid;
    gap: .35rem;
    color: var(--gm-ink);
    text-decoration: none;
}

.camera-thumb img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid rgba(36, 73, 44, .14);
    border-radius: .55rem;
    background: rgba(255, 255, 255, .55);
}

.camera-thumb span {
    color: var(--gm-muted);
    font-size: .78rem;
}

.pot-tank-line .badge {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

canvas {
    max-width: 100%;
}

.dt-container {
    color: var(--gm-ink);
}

.dt-container .dt-search input,
.dt-container .dt-length select {
    border: 1px solid rgba(36, 73, 44, .16);
    border-radius: .55rem;
    background-color: rgba(255, 255, 255, .78);
}

.dt-container .dt-search input:focus,
.dt-container .dt-length select:focus {
    border-color: rgba(56, 128, 83, .4);
    box-shadow: 0 0 0 .18rem rgba(56, 128, 83, .12);
}

.dt-container .dt-info {
    color: var(--gm-muted);
    font-size: .88rem;
}

.dt-container .page-link {
    color: var(--gm-leaf-deep);
    border-color: rgba(36, 73, 44, .14);
    background: rgba(255, 255, 255, .72);
}

.dt-container .page-link:focus {
    box-shadow: 0 0 0 .18rem rgba(56, 128, 83, .12);
}

.dt-container .page-item.active .page-link {
    color: #fff;
    border-color: var(--gm-leaf-deep);
    background-color: var(--gm-leaf-deep);
}

table.dataTable > tbody > tr.child ul.dtr-details {
    width: 100%;
}

@media (max-width: 575.98px) {
    main.container {
        padding-inline: 1rem;
    }

    main.container > .d-flex.justify-content-between.mb-4 {
        padding: 1rem;
    }

    .greenhouse-hero {
        grid-template-rows: 14rem auto;
    }

    .greenhouse-scene {
        min-height: 14rem;
    }

    .hero-copy,
    .device-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .navbar .nav-link {
        width: 100%;
    }

    .account-menu,
    .account-menu-toggle {
        width: 100%;
    }

    .account-dropdown {
        width: 100%;
    }

    .stat-card .card-body {
        min-height: 6.3rem;
    }

    .stat-icon {
        width: 2.25rem;
        height: 2.25rem;
    }

    .card-body {
        padding: 1rem;
    }
}
