/*!**************************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js!./assets_src/css/app.css ***!
  \**************************************************************************/
:root{
    --app-bg: #F6F7FB;
    --card-bg: rgba(255,255,255,0.82);
    --card-border: rgba(20, 20, 40, 0.06);
    --text: #121625;
    --muted: rgba(18, 22, 37, 0.60);

    --tabbar-bg: rgba(255,255,255,0.88);
    --tabbar-border: rgba(20, 20, 40, 0.08);

    --accent: #FF6B6B; /* Similar to the screenshot's active pill */
    --shadow: 0 10px 30px rgba(18,22,37,0.10);
    --radius-xl: 22px;

    --topbar-h: 54px;
    --tabbar-h: 68px;
}
/* Theme tokens (default = light) */
/* Dark theme overrides */
html[data-theme="dark"]{
    --app-bg: #0B0E14;
    --card-bg: rgba(20, 24, 35, 0.72);
    --card-border: rgba(255,255,255,0.10);
    --text: rgba(255,255,255,0.92);
    --muted: rgba(255,255,255,0.58);

    --tabbar-bg: rgba(18, 22, 32, 0.76);
    --tabbar-border: rgba(255,255,255,0.10);

    --shadow: 0 14px 40px rgba(0,0,0,0.45);
}


* { -webkit-tap-highlight-color: transparent; }
html, body {
    height: 100%;
}

.app-body{
    background: radial-gradient(1200px 600px at 20% 0%, rgba(255,107,107,0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 20%, rgba(73,175,255,0.12), transparent 55%),
    var(--app-bg);
    color: var(--text);
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    overflow: hidden; /* SPA-like; screens scroll internally */
}

.app-shell{
    height: 100%;
    display: flex;
    flex-direction: column;
}

.top-bar{
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
}

.top-bar__back{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 36px;
    border-radius: 14px;
    background: rgba(255,255,255,0.6);
    border: 1px solid var(--card-border);
    box-shadow: 0 6px 18px rgba(18,22,37,0.08);
    text-decoration: none;
    color: var(--text);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.top-bar__back.is-visible{
    opacity: 1;
    pointer-events: auto;
}

.top-bar__title{
    font-weight: 650;
    letter-spacing: -0.02em;
    font-size: 16px;
    color: rgba(18,22,37,0.88);
}

.top-bar__right{ width: 44px; } /* keeps title centered */

.screen-viewport{
    position: relative;
    flex: 1;
    overflow: hidden;
}

.screen{
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.screen.is-active{
    pointer-events: auto;
}

.screen__content{
    height: 100%;
    overflow-y: auto;
    /*padding-bottom: calc(var(--tabbar-h) + 24px);*/
    /*padding-bottom: calc(var(--tabbar-space, var(--tabbar-h)) + 24px);*/
    padding-bottom: calc(var(--tabbar-space, var(--tabbar-h)) + env(safe-area-inset-bottom, 0px) + 16px);
    -webkit-overflow-scrolling: touch;
}

.tabbar{
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    height: var(--tabbar-h);

    margin: 0; /* важно! */
    border-radius: 26px;
    background: var(--tabbar-bg);
    border: 1px solid var(--tabbar-border);
    box-shadow: var(--shadow);

    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    transition: transform .22s ease, opacity .22s ease;
    z-index: 50;
}

.tabbar.is-hidden{
    transform: translateY(140%);
    opacity: 0;
    pointer-events: none;
}

.tabbar__item{
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(18,22,37,0.55);
    font-size: 20px;
}
.tabbar__icon{
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .18s ease, color .18s ease, background .18s ease, box-shadow .18s ease;
}
.tabbar__item.is-active{
    color: white;
}


.tabbar__item.is-active .tabbar__icon{
    background: var(--accent);
    box-shadow: 0 14px 26px rgba(255,107,107,0.35);
    transform: translateY(-1px);
}

.tabbar__pill{
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 26px rgba(255,107,107,0.35);
}

.safe-area-bottom{
    display: none !important;
    height: 0 !important;
}


/* UI blocks */
.hero-card{
    border-radius: var(--radius-xl);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    padding: 16px;
}

.hero-card__title{
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -0.03em;
}

.hero-card__subtitle{
    margin-top: 4px;
    color: var(--muted);
}

.hero-card__meta{
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip{
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.65);
    border: 1px solid var(--card-border);
    color: rgba(18,22,37,0.75);
    font-size: 13px;
}

.section-title{
    font-weight: 700;
    color: rgba(18,22,37,0.78);
    letter-spacing: -0.01em;
}

.soft-card{
    border-radius: var(--radius-xl);
    background: rgba(255,255,255,0.70);
    border: 1px solid var(--card-border);
    padding: 14px 14px;
    box-shadow: 0 10px 26px rgba(18,22,37,0.07);
    font-weight: 600;
}

.soft-list{
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: rgba(255,255,255,0.70);
    box-shadow: 0 10px 26px rgba(18,22,37,0.07);
}

.soft-list__item{
    padding: 14px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text);
}

.soft-list__item + .soft-list__item{
    border-top: 1px solid rgba(20, 20, 40, 0.06);
}

.soft-metric{
    border-radius: var(--radius-xl);
    background: rgba(255,255,255,0.70);
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 26px rgba(18,22,37,0.07);
    padding: 14px;
}

.soft-metric__label{ color: var(--muted); font-weight: 650; }
.soft-metric__value{ font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }

/* Reduce motion support */
@media (prefers-reduced-motion: reduce){
    .tabbar, .top-bar__back{ transition: none !important; }
}
/* ===== Dark mode: unify cards/blocks to the same "glass" look ===== */
html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .soft-card,
html[data-theme="dark"] .soft-list,
html[data-theme="dark"] .soft-metric {
    background: rgba(20, 24, 35, 0.72);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 14px 40px rgba(0,0,0,0.45);
}

html[data-theme="dark"] .soft-list__item + .soft-list__item{
    border-top: 1px solid rgba(255,255,255,0.08);
}

html[data-theme="dark"] .section-title{
    color: rgba(255,255,255,0.75);
}

html[data-theme="dark"] .text-secondary{
    color: rgba(255,255,255,0.55) !important;
}

html[data-theme="dark"] .badge.text-bg-light{
    background: rgba(255,255,255,0.10) !important;
    color: rgba(255,255,255,0.78) !important;
    border: 1px solid rgba(255,255,255,0.12);
}
/* ===== Tabbar tuning for dark mode ===== */
html[data-theme="dark"] .tabbar{
    background: rgba(18, 22, 32, 0.78);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 18px 55px rgba(0,0,0,0.55);
}

html[data-theme="dark"] .tabbar__item{
    color: rgba(255,255,255,0.62);
}

html[data-theme="dark"] .tabbar__item .tabbar__icon{
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

html[data-theme="dark"] .tabbar__item.is-active{
    color: rgba(255,255,255,0.96);
}

html[data-theme="dark"] .tabbar__item.is-active .tabbar__icon{
    background: var(--accent);
    border-color: rgba(255,255,255,0.14);
    box-shadow:
        0 16px 34px rgba(255,107,107,0.40),
        0 10px 28px rgba(0,0,0,0.45);
}
html[data-theme="dark"] .app-body{
    background:
        radial-gradient(900px 500px at 20% 0%, rgba(255,107,107,0.12), transparent 60%),
        radial-gradient(800px 500px at 100% 30%, rgba(73,175,255,0.10), transparent 60%),
        var(--app-bg);
}
html[data-theme="dark"] .table>:not(caption)>*>*{
    background-color: rgba(0,0,0,0) !important;
}

/* MQTT status icon badge */
.ws-badge{
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);

    color: #ff4d4f; /* default: red */
}

/* icon size */
.ws-badge i{
    font-size: 16px;
    line-height: 1;
}

/* states (на будущее) */
.ws-badge.is-disconnected{
    color: #ff4d4f;
}

.ws-badge.is-connecting{
    color: #f1c40f;
}

.ws-badge.is-connected{
    color: #2ecc71;
}

/* Reserve bottom space for tabbar via CSS var */
.app-shell{
    --tabbar-space: 86px; /* adjust if your tabbar is taller/shorter */
}

/* This is the important part: screen viewport should use the variable */
/*.screen-viewport{*/
/*    padding-bottom: calc(var(--tabbar-space) + env(safe-area-inset-bottom, 0px));*/
/*}*/

/* When tabbar is hidden on detail screens: no reserved space */
.app-shell.is-tabbar-hidden{
    --tabbar-space: 0px;
}

/* Also hide the spacer element when tabbar hidden (it sits after nav) */
.app-shell.is-tabbar-hidden .safe-area-bottom{
    display: none !important;
    height: 0 !important;
}

/* ===== Home: Flower cards ===== */
.plant-list{
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/*
  Flower card layout notes:
  - The image block (.plant-card__img) is absolutely positioned and can overflow to the left.
  - The card itself reserves left padding for that floating image.
  - "OK" state uses a left-to-right fade for both background and border.
*/
.plant-card{
    /* Geometry tuning for the fade */
    --img-w: 130px;        /* must match .plant-card__img width */
    --img-left: -10px;     /* must match .plant-card__img left */
    --fade: 90px;          /* fade length (longer = smoother, more transparent area) */
    --solid-start: calc(var(--img-w) + var(--img-left) + 80px); /* where the solid fill begins */

    position: relative !important;
    display: block !important;
    overflow: visible !important;

    padding: 14px 14px 14px 135px !important; /* reserve space for the floating image */
    border-radius: 18px;

    background: rgba(255,255,255,0.82);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

/* Card states
   The fade (transparent -> solid) is controlled by:
   --solid-start : where the solid part begins
   --fade        : length of the transition
*/
.plant-card--ok{
    --state-bg-rgb: 208, 232, 214;
    --state-bg-a: 0.65;
    --state-border-rgb: 120, 200, 160;
    --state-border-a: 1;
}

.plant-card--warn{
    --state-bg-rgb: 248, 218, 190;
    --state-bg-a: 0.70;
    --state-border-rgb: 230, 170, 120;
    --state-border-a: 1;
}

.plant-card--done{
    --state-bg-rgb: 240, 242, 246;
    --state-bg-a: 0.80;
    --state-border-rgb: 200, 205, 215;
    --state-border-a: 1;
    /*opacity: .75;*/
}

.plant-card--ok,
.plant-card--warn,
.plant-card--done{
    /* Remove the real border so only the gradient border is visible */
    border-color: transparent !important;

    /* Background fade: fully transparent on the left, solid on the right */
    background: linear-gradient(
        90deg,
        rgba(var(--state-bg-rgb), 0) 0,
        rgba(var(--state-bg-rgb), 0) calc(var(--solid-start) - var(--fade)),
        rgba(var(--state-bg-rgb), var(--state-bg-a)) var(--solid-start),
        rgba(var(--state-bg-rgb), var(--state-bg-a)) 100%
    ) !important;
}

/* Gradient border for state cards */
.plant-card--ok::before,
.plant-card--warn::before,
.plant-card--done::before{
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px; /* border thickness */

    background: linear-gradient(
        90deg,
        rgba(var(--state-border-rgb), 0) 0,
        rgba(var(--state-border-rgb), 0) calc(var(--solid-start) - var(--fade)),
        rgba(var(--state-border-rgb), var(--state-border-a)) var(--solid-start),
        rgba(var(--state-border-rgb), var(--state-border-a)) 100%
    );

    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    pointer-events: none;
}


/* Dark theme state colors */
html[data-theme="dark"] .plant-card{
    background: rgba(20, 24, 35, 0.72);
    border-color: rgba(255,255,255,0.10);
}

html[data-theme="dark"] .plant-card--ok{
    --state-bg-rgb: 32, 54, 40;
    --state-bg-a: 0.58;
    --state-border-a: 0.85;
}

html[data-theme="dark"] .plant-card--warn{
    --state-bg-rgb: 63, 45, 34;
    --state-bg-a: 0.62;
    --state-border-a: 0.80;
}

html[data-theme="dark"] .plant-card--done{
    --state-bg-rgb: 26, 30, 40;
    --state-bg-a: 0.55;
    --state-border-a: 0.65;
    opacity: .72;
}

/* Floating image container */
.plant-card__img{
    position: absolute !important;
    left: -10px !important;
    top: -10px !important;
    width: 150px;
    height: 150px;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;

    pointer-events: none !important;
    z-index: 2;
}

/* Image itself */
.plant-card__img img{
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;

    filter: drop-shadow(0 10px 18px rgba(0,0,0,0.18));
}

/* Body/content should be above background */
.plant-card__body{
    position: relative;
    z-index: 3;

    padding: 0 !important;
    margin: 0 !important;
}

.plant-card__name{
    /*font-weight: 800;*/
    font-size: 22px;
}

.plant-card__meta{
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.plant-chip{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;

    background: rgba(255,255,255,0.62);
    border: 1px solid rgba(0,0,0,0.05);
    color: rgba(18,22,37,0.75);
}

html[data-theme="dark"] .plant-chip{
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.78);
}

.plant-chip i{
    font-size: 14px;
    opacity: .9;
}

.plant-time, .plant-ml{
    margin-left: auto;
    font-size: 12px;
    font-weight: 800;
    opacity: .8;
}
/* ===== Flower card: top-right icons ===== */

.plant-card {
    position: relative; /* needed for absolute icons */
}

.plant-card__icons {
    position: absolute;
    top: 10px;
    right: 12px;
    display: flex;
    gap: 4px;
    z-index: 5; /* above gradients/border */
}

/* make icon chips compact */
.plant-chip--icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* IMPORTANT: give body some right padding so title doesn't overlap icons */
.plant-card__body {
    padding-right: 110px; /* tweak if needed */
}

/* ===== Week days row ===== */

.plant-card__week {
    margin-top: 6px;
    display: flex;
    gap: 4px;
    align-items: center;
}

.week-day {
    /*width: 22px;*/
    /*height: 22px;*/
    display: inline-flex;
    align-items: center;
    justify-content: center;

    /*border-radius: 7px;*/
    font-size: 12px;
    line-height: 1;
    user-select: none;

    /* neutral state */
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.02);
    color: rgba(0, 0, 0, 0.25);
    opacity: 0.5;
}

/* weekend visuals */
.week-day.is-weekend {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.55);
}

/* active day */
.week-day.is-active {
    background: rgba(0, 0, 0, 0.10);
    border-color: rgba(0, 0, 0, 0.18);
    color: rgba(0, 0, 0, 0.85);
    font-weight: 600;
    opacity: 1;
}
/* Example: adapt for dark theme selector if you have one */
[data-theme="dark"] .week-day {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.80);
}

[data-theme="dark"] .week-day.is-weekend {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.55);
}

[data-theme="dark"] .week-day.is-active {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.20);
    color: rgba(255, 255, 255, 0.92);
}
.min-w-0>div {
    display: inline-block;
}

.hero-card .fw-semibold {
    color: #2c2f3e;
}
.plant-card__icons .plant-chip i{
    font-size: 12px;
}
.plant-card__icons .plant-chip{
    width: 25px;
    height: 25px;
}
.plant-card-link{
    text-decoration: none;
    color: inherit;
    display: block;
}
/* schedule icon state */
.plant-chip.is-off {
    opacity: 0.35;
    filter: saturate(0.4);
}
.plant-chip.is-on {
    opacity: 1;
}

/* ===== Flower detail ===== */
.flower-hero{
    position: relative;
    border-radius: 0 0 26px 26px;
    overflow: hidden;
    /*background: rgba(120, 180, 140, 0.18);*/
    /*border: 1px solid var(--card-border);*/
    /*box-shadow: var(--shadow);*/
}

/* Times list (editable HH:MM chips) */
.flower-times{
    grid-column: 1 / -1;
}
.flower-times__label{
    font-size: 12px;
    margin-bottom: 6px;
}
.flower-times__list{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
/*.flower-time-item{*/
/*    display: inline-flex;*/
/*}*/
.flower-time-input{
    width: 100%;
    padding: 6px 10px;
    border: none;
    outline: none;
    font-weight: 600;
}
.flower-time-input:focus{
    border-color: rgba(0,0,0,0.18);
    background: rgba(255,255,255,0.55);
    outline: none;
    box-shadow: none;
}

.flower-hero__media{
    height: 220px;
    display:flex;
    align-items:center;
    justify-content:center;
    position: relative;
    background:
        radial-gradient(240px 180px at 30% 30%, rgba(255,255,255,0.55), transparent 65%),
        radial-gradient(260px 190px at 70% 20%, rgba(255,255,255,0.35), transparent 70%);
}

.flower-hero__img{
    width: 420px;
    height: 420px;
    object-fit: contain;
    transform: translateY(-15px);
    filter: drop-shadow(0 18px 22px rgba(18,22,37,0.18));
}

.flower-hero__card{
    background: rgba(255,255,255,0.88);
    border-top: 1px solid var(--card-border);
    padding: 16px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

html[data-theme="dark"] .flower-hero__card{
    background: rgba(20, 24, 35, 0.78);
    border-top: 1px solid rgba(255,255,255,0.10);
}

.flower-hero__title{
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.flower-hero__subtitle{
    margin-top: 2px;
}

.flower-hero__grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.flower-metric{
    border-radius: 16px;
    background: rgba(255,255,255,0.70);
    border: 1px solid var(--card-border);
    padding: 10px 12px;
}

html[data-theme="dark"] .flower-metric{
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
}

.flower-metric__label{
    font-size: 12px;
    font-weight: 650;
}
.flower-metric__value{
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Calendar */
.flower-calendar{
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    user-select: none;
}

.flower-cal__cell{
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight: 750;
    font-size: 12px;
    color: rgba(18,22,37,0.65);
    background: rgba(255,255,255,0.35);
    border: 1px solid rgba(20,20,40,0.06);
}

html[data-theme="dark"] .flower-cal__cell{
    color: rgba(255,255,255,0.70);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
}

.flower-cal__cell.is-muted{
    opacity: 0.35;
}

.flower-cal__cell.is-active{
    background: rgba(255,107,107,0.95);
    color: white;
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 14px 26px rgba(255,107,107,0.30);
}

/* Form layout */
.flower-form__row{
    display:flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid rgba(20,20,40,0.06);
}
.flower-form__row:first-child{ border-top: none; padding-top: 0; }
html[data-theme="dark"] .flower-form__row{
    border-top: 1px solid rgba(255,255,255,0.08);
}
.flower-form__label{
    font-weight: 750;
    font-size: 13px;
}

/* Telemetry list */
.flower-telemetry__row{
    display:flex;
    align-items:center;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid rgba(20,20,40,0.06);
}
.flower-telemetry__row:first-child{ border-top: none; padding-top: 0; }
html[data-theme="dark"] .flower-telemetry__row{
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* Schedule icon states */
[data-flower-schedule-icon].is-off{
    opacity: 0.35;
}


/* ---- Skeleton / no-layout-shift helpers ---- */
.plant-card__week {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
    min-height: 28px; /* reserve space */
}

.week-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    user-select: none;
}

/* skeleton look (subtle) */
.week-chip.is-skeleton {
    opacity: 0.45;
}

/* numbers shouldn't jump in width */
.plant-card__meta,
.plant-time,
.plant-ml,
.flower-metric__value,
.soft-metric__value {
    font-variant-numeric: tabular-nums;
}

/* reserve space for meta so it doesn't jump */
.plant-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.plant-time {
    min-width: 110px;
    display: inline-block;
}

.plant-ml {
    min-width: 60px;
    text-align: right;
    display: inline-block;
}

.plant-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* ===== Top bar: ALWAYS overlay (global behavior) ===== */

.app-shell{
    height: 100%;
    position: relative;
    /* it can stay flex, fixed element won't take space */
    display: flex;
    flex-direction: column;

    /* default: content is pushed under topbar (can be overridden per-screen) */
    --content-top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 10px);
}

/* topbar becomes fixed overlay and doesn't occupy layout space */
.top-bar{
    position: fixed;
    top: env(safe-area-inset-top, 0px);
    left: 0;
    right: 0;
    z-index: 60;

    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;

    /* nice glass by default */
    /*background: rgba(255,255,255,0.55);*/
    /*backdrop-filter: blur(14px);*/
    /*-webkit-backdrop-filter: blur(14px);*/
}

/* dark mode glass */
/*html[data-theme="dark"] .top-bar{*/
/*    background: rgba(18, 22, 32, 0.45);*/
/*}*/

/* viewport can keep flex:1 */
.screen-viewport{
    position: relative;
    flex: 1;
    overflow: hidden;
}

/* IMPORTANT: content now accounts for overlay topbar by padding-top */
.screen__content{
    height: 100%;
    overflow-y: auto;

    padding-top: var(--content-top);
    padding-bottom: calc(var(--tabbar-space, var(--tabbar-h)) + env(safe-area-inset-bottom, 0px) + 16px);

    -webkit-overflow-scrolling: touch;
}

.screen[data-top-inset="0"]{
    --content-top: 0px;
}
.flower-metric__value--clickable { cursor: pointer; }
.flower-metric__value--clickable:hover { text-decoration: underline; }
.volume-picker-anchor{
    position: fixed;
    left: 16px;
    top: 16px;
    width: 220px;

    opacity: 0;
    pointer-events: none;
    z-index: -1;
}
.flower-time-metric--disabled {
    opacity: .5;
}

.flower-time-metric--disabled .flower-metric__value--clickable {
    pointer-events: none;
    cursor: default !important;
}

.flower-time-metric--disabled select {
    pointer-events: none;
    cursor: default !important;
}

/* ===== Flower metric select (looks like value text) ===== */
.flower-metric-select{
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;

    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);

    padding: 0;
    margin: 0;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    cursor: pointer;

    /* keep space for arrow */
    padding-right: 18px;
}

/* custom arrow */
.flower-metric__value{
    position: relative;
}

.flower-metric__value:has(.flower-metric-select)::after{
    content: "▾";
    position: absolute;
    right: 0;
    top: 0;
    line-height: 1.2;
    opacity: .55;
    pointer-events: none;
}
.flower-controls{
    grid-column: 1 / -1;
}
.user-avatar{
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
}

