/* ========================================================= */
/* HOME - HUMIDI-TEC                                         */
/* DISEÑO CLARO, COMPACTO Y CON BUEN CONTRASTE               */
/* ========================================================= */

.home-page {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
}


/* ========================================================= */
/* ENCABEZADO                                                */
/* ========================================================= */

.home-header {
    margin-bottom: 18px;
}

.home-header h1 {
    margin: 0;

    font-size: 30px;
    font-weight: 850;
    line-height: 1.15;

    color: #153c2d;
}

.home-header p {
    margin: 6px 0 0;

    font-size: 14px;
    font-weight: 550;
    line-height: 1.5;

    color: #4d6358;
}


/* ========================================================= */
/* ESTADO GENERAL                                            */
/* ========================================================= */

.home-status {
    min-height: 92px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;

    padding: 16px 20px;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f1f8f4 100%
        );

    border: 1px solid #bcd4c7;
    border-radius: 15px;

    box-shadow:
        0 5px 16px rgba(28, 78, 55, 0.06);
}


/* ========================================================= */
/* ESTADO PRINCIPAL                                          */
/* ========================================================= */

.home-status-main {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 14px;
}

.home-status-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #087344,
            #1e9e5f
        );

    border-radius: 12px;

    box-shadow:
        0 0 0 5px rgba(26, 139, 83, 0.10);
}

.home-status-icon svg {
    width: 24px;
    height: 24px;
}

.home-status-text {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.home-status-text > span {
    margin-bottom: 2px;

    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.9px;

    color: #116f45;
}

.home-status-text strong {
    font-size: 18px;
    font-weight: 850;
    line-height: 1.25;

    color: #143c2d;
}

.home-status-text p {
    margin: 4px 0 0;

    font-size: 12px;
    font-weight: 550;
    line-height: 1.45;

    color: #52675c;
}


/* ========================================================= */
/* RESUMEN SUPERIOR                                          */
/* ========================================================= */

.home-status-summary {
    display: flex;
    align-items: center;

    flex-shrink: 0;
}

.status-mini {
    min-width: 138px;

    display: flex;
    align-items: center;

    gap: 9px;

    padding: 5px 15px;

    border-left: 1px solid #cddfd5;
}

.status-mini:first-child {
    border-left: none;
}

.status-mini > div {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.status-mini small {
    font-size: 11px;
    font-weight: 700;

    color: #4e6358;
}

.status-mini strong {
    margin-top: 2px;

    font-size: 13px;
    font-weight: 850;

    color: #214838;

    white-space: nowrap;
}


/* ========================================================= */
/* ICONOS RESUMEN                                            */
/* ========================================================= */

.status-mini-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;
}

.status-mini-icon svg {
    width: 17px;
    height: 17px;
}


/* SENSORES */

.status-mini-icon.sensors {
    color: #1d64a1;
    background: #dceaf7;

    border: 1px solid #c6dcec;
}


/* RIEGO */

.status-mini-icon.water {
    color: #0d7373;
    background: #d9efef;

    border: 1px solid #c1dddd;
}


/* PLANTAS */

.status-mini-icon.plants {
    color: #126f45;
    background: #dcefe3;

    border: 1px solid #c4dece;
}


/* AVISO */

.attention-text {
    color: #765300 !important;
}


/* ========================================================= */
/* SECCIONES                                                 */
/* ========================================================= */

.home-section {
    margin-top: 24px;
}

.home-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 11px;
}

.home-section-heading {
    min-width: 0;
}

.home-section-label {
    display: block;

    margin-bottom: 2px;

    font-size: 10px;
    font-weight: 850;
    letter-spacing: 1.15px;

    color: #0b7748;
}

.home-section-header h2 {
    margin: 0;

    font-size: 21px;
    font-weight: 850;

    color: #153b2c;
}

.home-section-header p {
    margin: 4px 0 0;

    font-size: 12px;
    font-weight: 550;

    color: #566d61;
}


/* ========================================================= */
/* BOTÓN DE SECCIÓN                                          */
/* ========================================================= */

.section-link {
    min-height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding:
        7px
        13px;

    flex-shrink: 0;

    color: #0d613b;
    background: #e6f3eb;

    border:
        1px solid #b8d6c5;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 850;

    text-decoration: none;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.section-link:hover {
    color: #ffffff;
    background: #137849;
    border-color: #137849;

    transform: translateY(-1px);
}

.section-link svg {
    width: 14px;
    height: 14px;
}


/* ========================================================= */
/* TABLA PLANTAS                                             */
/* ========================================================= */

.plants-card {
    overflow: hidden;

    background: #ffffff;

    border:
        1px solid #bfd5c9;

    border-radius: 14px;

    box-shadow:
        0 5px 15px rgba(25, 70, 50, 0.06);
}


/* ========================================================= */
/* ENCABEZADO DE TABLA                                       */
/* ========================================================= */

.plants-table-header {
    min-height: 46px;

    display: grid;

    grid-template-columns:
        minmax(0, 1.65fr)
        minmax(110px, 0.55fr)
        minmax(110px, 0.55fr)
        minmax(150px, 0.75fr);

    align-items: center;

    gap: 10px;

    padding:
        0
        20px;

    background:
        linear-gradient(
            90deg,
            #d3eadc 0%,
            #d3ebe4 50%,
            #d5e6ed 100%
        );

    border-bottom:
        1px solid #a7c8b8;

    box-shadow:
        inset 0 -2px 0 rgba(18, 105, 67, 0.08);
}

.plants-table-header span {
    min-height: 46px;

    display: flex;
    align-items: center;

    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.1px;

    color: #163c2d;
}

.plants-table-header span:first-child {
    justify-content: flex-start;
    text-align: left;
}

.plants-table-header span:nth-child(2),
.plants-table-header span:nth-child(3),
.plants-table-header span:nth-child(4) {
    justify-content: center;
    text-align: center;
}


/* ========================================================= */
/* FILA DE PLANTA                                            */
/* ========================================================= */

.plant-summary-row {
    position: relative;

    min-height: 82px;

    display: grid;

    grid-template-columns:
        minmax(220px, 1.25fr)
        minmax(160px, 0.9fr)
        minmax(135px, 0.75fr)
        minmax(190px, 1fr);

    align-items: center;

    gap: 10px;

    padding:
        12px
        20px
        12px
        23px;

    background: #ffffff;

    border-bottom:
        1px solid #d1dfd7;

    transition:
        background-color 0.15s ease;
}

.plant-summary-row:last-child {
    border-bottom: none;
}

.plant-summary-row:hover {
    background: #f4f9f6;
}


/* ========================================================= */
/* BARRA IZQUIERDA                                           */
/* ========================================================= */

.plant-summary-row::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;

    width: 4px;
    height: 100%;
}

.plant-summary-row.warning::before {
    background: #dca91d;
}

.plant-summary-row.good::before {
    background: #14945a;
}


/* ========================================================= */
/* IDENTIDAD                                                 */
/* ========================================================= */

.plant-summary-identity {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 11px;
}

.plant-number {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: #086e40;
    background: #dcefe3;

    border:
        1px solid #b8d5c3;

    border-radius: 9px;

    font-size: 14px;
    font-weight: 850;
}

.plant-summary-identity > div {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.plant-summary-identity small {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.7px;

    color: #4c6358;
}

.plant-summary-identity strong {
    margin-top: 2px;

    font-size: 16px;
    font-weight: 850;

    color: #113e2d;
}


/* ========================================================= */
/* MÉTRICAS                                                  */
/* ========================================================= */

.plant-summary-value {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;
}

.plant-summary-value > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.metric-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;
}

.metric-icon svg {
    width: 16px;
    height: 16px;
}

.plant-summary-value small {
    font-size: 10px;
    font-weight: 700;

    color: #4d6358;
}

.plant-summary-value strong {
    margin-top: 2px;

    font-size: 20px;
    font-weight: 850;

    line-height: 1;
}


/* ========================================================= */
/* HUMEDAD                                                   */
/* ========================================================= */

.plant-summary-value.humidity .metric-icon {
    color: #086c79;
    background: #d3e9ed;

    border:
        1px solid #b7d8dd;
}

.plant-summary-value.humidity strong {
    color: #075d68;
}


/* ========================================================= */
/* BATERÍA                                                   */
/* ========================================================= */

.plant-summary-value.battery .metric-icon {
    color: #176d45;
    background: #d7ebde;

    border:
        1px solid #b9d7c3;
}

.plant-summary-value.battery strong {
    color: #185838;
}


/* ========================================================= */
/* ESTADO                                                    */
/* ========================================================= */

.plant-summary-condition {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;
}

.condition-dot {
    width: 11px;
    height: 11px;

    flex-shrink: 0;

    border-radius: 50%;
}

.plant-summary-condition > div {
    min-width: 0;

    display: flex;
    flex-direction: column;

    align-items: flex-start;
}

.plant-summary-condition small {
    font-size: 10px;
    font-weight: 700;

    color: #4d6358;
}

.plant-summary-condition strong {
    margin-top: 2px;

    font-size: 12px;
    font-weight: 850;
    line-height: 1.3;
}


/* ========================================================= */
/* ESTADO - ATENCIÓN                                         */
/* ========================================================= */

.plant-summary-row.warning
.condition-dot {
    background: #dea91f;

    box-shadow:
        0 0 0 4px rgba(222, 169, 31, 0.16);
}

.plant-summary-row.warning
.plant-summary-condition strong {
    color: #715000;
}


/* ========================================================= */
/* ESTADO - CORRECTO                                         */
/* ========================================================= */

.plant-summary-row.good
.condition-dot {
    background: #14945a;

    box-shadow:
        0 0 0 4px rgba(20, 148, 90, 0.14);
}

.plant-summary-row.good
.plant-summary-condition strong {
    color: #0b693b;
}


/* ========================================================= */
/* SISTEMA DE RIEGO                                          */
/* ========================================================= */

.irrigation-card {
    min-height: 88px;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr))
        auto;

    align-items: center;

    padding:
        0
        18px;

    background: #ffffff;

    border:
        1px solid #bfd5c9;

    border-radius: 14px;

    box-shadow:
        0 5px 15px rgba(25, 70, 50, 0.06);
}


/* ========================================================= */
/* ITEM DE RIEGO                                             */
/* ========================================================= */

.irrigation-item {
    min-height: 58px;

    display: flex;
    align-items: center;

    gap: 10px;

    padding:
        5px
        18px;

    border-left:
        1px solid #cddfd5;
}

.irrigation-item:first-child {
    padding-left: 0;
    border-left: none;
}

.irrigation-item > div {
    display: flex;
    flex-direction: column;
}

.irrigation-item > div > span {
    font-size: 11px;
    font-weight: 700;

    color: #4d6358;
}

.irrigation-item > div > strong {
    margin-top: 2px;

    font-size: 14px;
    font-weight: 850;

    color: #244b39;
}


/* ========================================================= */
/* ICONOS RIEGO                                              */
/* ========================================================= */

.irrigation-item-icon {
    width: 35px;
    height: 35px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;
}

.irrigation-item-icon svg {
    width: 17px;
    height: 17px;
}

.irrigation-item-icon.mode {
    color: #0d7373;
    background: #d9efef;

    border: 1px solid #c0dddd;
}

.irrigation-item-icon.pump {
    color: #176d45;
    background: #dcefe3;

    border: 1px solid #bfdac9;
}


/* ========================================================= */
/* ESTADO RIEGO                                              */
/* ========================================================= */

.irrigation-state-dot {
    width: 11px;
    height: 11px;

    flex-shrink: 0;

    background: #14945a;

    border-radius: 50%;

    box-shadow:
        0 0 0 4px rgba(20, 148, 90, 0.13);
}

.good-text {
    color: #0b693b !important;
}


/* ========================================================= */
/* BOTÓN RIEGO                                               */
/* ========================================================= */

.irrigation-main-action {
    min-height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    margin-left: 14px;

    padding:
        8px
        15px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #087344,
            #17995b
        );

    border-radius: 10px;

    font-size: 12px;
    font-weight: 850;

    text-decoration: none;

    white-space: nowrap;

    box-shadow:
        0 5px 12px rgba(13, 116, 69, 0.16);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.irrigation-main-action:hover {
    color: #ffffff;

    transform: translateY(-1px);

    box-shadow:
        0 7px 16px rgba(13, 116, 69, 0.20);
}

.irrigation-main-action svg {
    width: 14px;
    height: 14px;
}


/* ========================================================= */
/* ESTADO GLOBAL - WARNING                                   */
/* ========================================================= */

.home-status.warning {
    background:
        linear-gradient(
            135deg,
            #fffdf8,
            #fff4db
        );

    border-color: #dfca91;
}

.home-status.warning .home-status-icon {
    background:
        linear-gradient(
            135deg,
            #b67908,
            #daaa2a
        );
}


/* ========================================================= */
/* FOCUS                                                     */
/* ========================================================= */

.section-link:focus-visible,
.irrigation-main-action:focus-visible {
    outline:
        3px solid rgba(18, 128, 78, 0.25);

    outline-offset: 3px;
}


/* ========================================================= */
/* LAPTOP                                                    */
/* ========================================================= */

@media (max-width: 1050px) {

    .plants-table-header,
    .plant-summary-row {
        grid-template-columns:
            minmax(200px, 1.2fr)
            150px
            130px
            minmax(175px, 1fr);

        gap: 8px;
    }

}


/* ========================================================= */
/* PANTALLA MEDIANA                                          */
/* ========================================================= */

@media (max-width: 950px) {

    .home-status {
        align-items: flex-start;
        flex-direction: column;

        gap: 16px;
    }

    .home-status-summary {
        width: 100%;
    }

    .status-mini {
        flex: 1;
    }

    .irrigation-card {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .irrigation-main-action {
        grid-column:
            1 / -1;

        width: 100%;

        margin:
            0
            0
            14px;
    }

}


/* ========================================================= */
/* TABLET                                                    */
/* ========================================================= */

@media (max-width: 760px) {

    .plants-table-header {
        display: none;
    }

    .plant-summary-row {
        grid-template-columns:
            1fr
            1fr;

        gap: 14px;

        padding:
            15px
            17px
            15px
            20px;
    }

    .plant-summary-identity {
        grid-column:
            1 / -1;
    }

    .plant-summary-value {
        justify-content: flex-start;
    }

    .plant-summary-condition {
        grid-column:
            1 / -1;

        justify-content: flex-start;

        padding-top: 10px;

        border-top:
            1px solid #d6e2db;
    }

    .irrigation-card {
        grid-template-columns: 1fr;
    }

    .irrigation-item {
        padding:
            11px
            0;

        border-left: none;

        border-bottom:
            1px solid #d6e2db;
    }

    .irrigation-item:nth-child(3) {
        border-bottom: none;
    }

    .irrigation-main-action {
        margin-top: 12px;
    }

}


/* ========================================================= */
/* MÓVIL                                                     */
/* ========================================================= */

@media (max-width: 600px) {

    .home-header h1 {
        font-size: 27px;
    }

    .home-status-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .status-mini {
        width: 100%;

        padding:
            9px
            0;

        border-left: none;

        border-bottom:
            1px solid #d6e2db;
    }

    .status-mini:last-child {
        border-bottom: none;
    }

    .home-section-header {
        align-items: flex-start;
        flex-direction: column;

        gap: 10px;
    }

    .section-link {
        width: 100%;
    }

}


/* ========================================================= */
/* MÓVIL PEQUEÑO                                             */
/* ========================================================= */

@media (max-width: 480px) {

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

    .plant-summary-identity,
    .plant-summary-condition {
        grid-column: auto;
    }

    .plant-summary-value,
    .plant-summary-condition {
        justify-content: flex-start;
    }

}


/* ========================================================= */
/* MENOS MOVIMIENTO                                          */
/* ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .section-link,
    .irrigation-main-action,
    .plant-summary-row {
        transition: none;
    }

    .section-link:hover,
    .irrigation-main-action:hover {
        transform: none;
    }/* ========================================================= */
/* HOME - HUMIDI-TEC                                         */
/* ========================================================= */

.home-page {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
}


/* ========================================================= */
/* ENCABEZADO                                                */
/* ========================================================= */

.home-header {
    margin-bottom: 18px;
}

.home-header h1 {
    margin: 0;

    font-size: 30px;
    font-weight: 850;
    line-height: 1.15;

    color: #153c2d;
}

.home-header p {
    margin: 6px 0 0;

    font-size: 14px;
    font-weight: 550;
    line-height: 1.5;

    color: #4d6358;
}


/* ========================================================= */
/* ESTADO GENERAL                                            */
/* ========================================================= */

.home-status {
    min-height: 92px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;

    padding: 16px 20px;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f1f8f4 100%
        );

    border: 1px solid #bcd4c7;
    border-radius: 15px;

    box-shadow:
        0 5px 16px rgba(28, 78, 55, 0.06);
}

.home-status-main {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 14px;
}

.home-status-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #087344,
            #1e9e5f
        );

    border-radius: 12px;

    box-shadow:
        0 0 0 5px rgba(26, 139, 83, 0.10);
}

.home-status-icon svg {
    width: 24px;
    height: 24px;
}

.home-status-text {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.home-status-text > span {
    margin-bottom: 2px;

    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.9px;

    color: #116f45;
}

.home-status-text strong {
    font-size: 18px;
    font-weight: 850;

    line-height: 1.25;

    color: #143c2d;
}

.home-status-text p {
    margin: 4px 0 0;

    font-size: 12px;
    font-weight: 550;

    line-height: 1.45;

    color: #52675c;
}


/* ========================================================= */
/* RESUMEN SUPERIOR                                          */
/* ========================================================= */

.home-status-summary {
    display: flex;
    align-items: center;

    flex-shrink: 0;
}

.status-mini {
    min-width: 138px;

    display: flex;
    align-items: center;

    gap: 9px;

    padding: 5px 15px;

    border-left:
        1px solid #cddfd5;
}

.status-mini:first-child {
    border-left: none;
}

.status-mini > div {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.status-mini small {
    font-size: 11px;
    font-weight: 700;

    color: #4e6358;
}

.status-mini strong {
    margin-top: 2px;

    font-size: 13px;
    font-weight: 850;

    color: #214838;

    white-space: nowrap;
}


/* ========================================================= */
/* ICONOS SUPERIORES                                         */
/* ========================================================= */

.status-mini-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;
}

.status-mini-icon svg {
    width: 17px;
    height: 17px;
}

.status-mini-icon.sensors {
    color: #1d64a1;
    background: #dceaf7;

    border: 1px solid #c6dcec;
}

.status-mini-icon.water {
    color: #0d7373;
    background: #d9efef;

    border: 1px solid #c1dddd;
}

.status-mini-icon.plants {
    color: #126f45;
    background: #dcefe3;

    border: 1px solid #c4dece;
}

.attention-text {
    color: #765300 !important;
}


/* ========================================================= */
/* SECCIONES                                                 */
/* ========================================================= */

.home-section {
    margin-top: 24px;
}

.home-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 11px;
}

.home-section-heading {
    min-width: 0;
}

.home-section-label {
    display: block;

    margin-bottom: 2px;

    font-size: 10px;
    font-weight: 850;
    letter-spacing: 1.15px;

    color: #0b7748;
}

.home-section-header h2 {
    margin: 0;

    font-size: 21px;
    font-weight: 850;

    color: #153b2c;
}

.home-section-header p {
    margin: 4px 0 0;

    font-size: 12px;
    font-weight: 550;

    color: #566d61;
}


/* ========================================================= */
/* BOTÓN SECCIÓN                                             */
/* ========================================================= */

.section-link {
    min-height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding:
        7px
        13px;

    flex-shrink: 0;

    color: #0d613b;
    background: #e6f3eb;

    border:
        1px solid #b8d6c5;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 850;

    text-decoration: none;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.section-link:hover {
    color: #ffffff;

    background: #137849;
    border-color: #137849;

    transform: translateY(-1px);
}

.section-link svg {
    width: 14px;
    height: 14px;
}


/* ========================================================= */
/* TABLA DE PLANTAS                                          */
/* ========================================================= */

.plants-card {
    overflow: hidden;

    background: #ffffff;

    border:
        1px solid #b8d0c3;

    border-radius: 14px;

    box-shadow:
        0 5px 15px rgba(25, 70, 50, 0.06);
}


/* ========================================================= */
/* ENCABEZADO TABLA                                          */
/* ========================================================= */

.plants-table-header {
    min-height: 46px;

    display: grid;

    grid-template-columns:
        minmax(250px, 1.35fr)
        minmax(150px, 0.82fr)
        minmax(135px, 0.72fr)
        minmax(195px, 1fr);

    align-items: center;

    gap: 12px;

    padding:
        0
        18px;

    background:
        linear-gradient(
            90deg,
            #cde6d8 0%,
            #cfe8df 55%,
            #d0e3ea 100%
        );

    border-bottom:
        1px solid #9dbfae;

    box-shadow:
        inset 0 -2px 0 rgba(18, 105, 67, 0.08);
}

.plants-table-header span {
    min-height: 46px;

    display: flex;
    align-items: center;

    font-size: 12px;
    font-weight: 850;

    color: #143b2c;
}

.plants-table-header span:first-child {
    justify-content: flex-start;
}

.plants-table-header span:nth-child(2),
.plants-table-header span:nth-child(3),
.plants-table-header span:nth-child(4) {
    justify-content: center;

    text-align: center;
}


/* ========================================================= */
/* FILA                                                      */
/* ========================================================= */

.plant-summary-row {
    position: relative;

    min-height: 82px;

    display: grid;

    grid-template-columns:
        minmax(250px, 1.35fr)
        minmax(150px, 0.82fr)
        minmax(135px, 0.72fr)
        minmax(195px, 1fr);

    align-items: center;

    gap: 12px;

    padding:
        12px
        18px
        12px
        21px;

    background: #ffffff;

    border-bottom:
        1px solid #ceded5;

    transition:
        background-color 0.15s ease;
}

.plant-summary-row:last-child {
    border-bottom: none;
}

.plant-summary-row:hover {
    background: #f3f8f5;
}


/* ========================================================= */
/* BARRA DE ESTADO                                           */
/* ========================================================= */

.plant-summary-row::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;

    width: 4px;
    height: 100%;
}

.plant-summary-row.warning::before {
    background: #d8a31b;
}

.plant-summary-row.good::before {
    background: #108d55;
}


/* ========================================================= */
/* PLANTA                                                    */
/* ========================================================= */

.plant-summary-identity {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 12px;
}

.plant-number {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: #076d40;
    background: #d9ecdf;

    border:
        1px solid #b5d3c0;

    border-radius: 9px;

    font-size: 14px;
    font-weight: 850;
}

.plant-identity-text {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.plant-identity-text > strong {
    overflow: hidden;

    font-size: 16px;
    font-weight: 850;

    color: #103b2b;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* ========================================================= */
/* PERFIL + SENSOR                                           */
/* ========================================================= */

.plant-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 5px;

    margin-top: 4px;

    font-size: 11px;
    font-weight: 650;

    color: #52675d;
}

.plant-meta > span:first-child {
    color: #186a45;

    font-weight: 750;
}

.meta-separator {
    color: #83968d;
}


/* ========================================================= */
/* MÉTRICAS                                                  */
/* ========================================================= */

.plant-summary-value {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;
}

.plant-summary-value > div {
    display: flex;
    flex-direction: column;

    align-items: flex-start;
}

.metric-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;
}

.metric-icon svg {
    width: 16px;
    height: 16px;
}

.plant-summary-value small {
    font-size: 10px;
    font-weight: 700;

    color: #4d6358;
}

.plant-summary-value strong {
    margin-top: 2px;

    font-size: 20px;
    font-weight: 850;

    line-height: 1;
}


/* ========================================================= */
/* HUMEDAD                                                   */
/* ========================================================= */

.plant-summary-value.humidity
.metric-icon {
    color: #076a77;
    background: #d1e8ec;

    border:
        1px solid #b3d4da;
}

.plant-summary-value.humidity strong {
    color: #075c66;
}


/* ========================================================= */
/* BATERÍA                                                   */
/* ========================================================= */

.plant-summary-value.battery
.metric-icon {
    color: #146c43;
    background: #d6eadc;

    border:
        1px solid #b5d3bf;
}

.plant-summary-value.battery strong {
    color: #175837;
}


/* ========================================================= */
/* ESTADO                                                    */
/* ========================================================= */

.plant-summary-condition {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;
}

.condition-dot {
    width: 11px;
    height: 11px;

    flex-shrink: 0;

    border-radius: 50%;
}

.plant-summary-condition > div {
    min-width: 0;

    display: flex;
    flex-direction: column;

    align-items: flex-start;
}

.plant-summary-condition small {
    font-size: 10px;
    font-weight: 700;

    color: #4d6358;
}

.plant-summary-condition strong {
    margin-top: 2px;

    font-size: 12px;
    font-weight: 850;

    line-height: 1.3;
}


/* ATENCIÓN */

.plant-summary-row.warning
.condition-dot {
    background: #dda71e;

    box-shadow:
        0 0 0 4px rgba(221, 167, 30, 0.16);
}

.plant-summary-row.warning
.plant-summary-condition strong {
    color: #725000;
}


/* CORRECTO */

.plant-summary-row.good
.condition-dot {
    background: #108d55;

    box-shadow:
        0 0 0 4px rgba(16, 141, 85, 0.14);
}

.plant-summary-row.good
.plant-summary-condition strong {
    color: #09663a;
}


/* ========================================================= */
/* SISTEMA DE RIEGO                                          */
/* ========================================================= */

.irrigation-card {
    min-height: 88px;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr))
        auto;

    align-items: center;

    padding:
        0
        18px;

    background: #ffffff;

    border:
        1px solid #b8d0c3;

    border-radius: 14px;

    box-shadow:
        0 5px 15px rgba(25, 70, 50, 0.06);
}

.irrigation-item {
    min-height: 58px;

    display: flex;
    align-items: center;

    gap: 10px;

    padding:
        5px
        18px;

    border-left:
        1px solid #c9dbd1;
}

.irrigation-item:first-child {
    padding-left: 0;

    border-left: none;
}

.irrigation-item > div {
    display: flex;
    flex-direction: column;
}

.irrigation-item > div > span {
    font-size: 11px;
    font-weight: 700;

    color: #4d6358;
}

.irrigation-item > div > strong {
    margin-top: 2px;

    font-size: 14px;
    font-weight: 850;

    color: #244b39;
}


/* ========================================================= */
/* ICONOS RIEGO                                              */
/* ========================================================= */

.irrigation-item-icon {
    width: 35px;
    height: 35px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;
}

.irrigation-item-icon svg {
    width: 17px;
    height: 17px;
}

.irrigation-item-icon.mode {
    color: #0c7070;
    background: #d6ecec;

    border:
        1px solid #bad8d8;
}

.irrigation-item-icon.pump {
    color: #156b43;
    background: #d9ecdf;

    border:
        1px solid #b9d6c3;
}


/* ========================================================= */
/* ESTADO RIEGO                                              */
/* ========================================================= */

.irrigation-state-dot {
    width: 11px;
    height: 11px;

    flex-shrink: 0;

    background: #108d55;

    border-radius: 50%;

    box-shadow:
        0 0 0 4px rgba(16, 141, 85, 0.13);
}

.good-text {
    color: #09663a !important;
}


/* ========================================================= */
/* BOTÓN RIEGO                                               */
/* ========================================================= */

.irrigation-main-action {
    min-height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    margin-left: 14px;

    padding:
        8px
        15px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #087344,
            #17995b
        );

    border-radius: 10px;

    font-size: 12px;
    font-weight: 850;

    text-decoration: none;

    white-space: nowrap;

    box-shadow:
        0 5px 12px rgba(13, 116, 69, 0.16);
}

.irrigation-main-action:hover {
    color: #ffffff;
}

.irrigation-main-action svg {
    width: 14px;
    height: 14px;
}


/* ========================================================= */
/* RESPONSIVE                                                */
/* ========================================================= */

@media (max-width: 1050px) {

    .plants-table-header,
    .plant-summary-row {
        grid-template-columns:
            minmax(220px, 1.25fr)
            145px
            125px
            minmax(180px, 1fr);

        gap: 8px;
    }

}


@media (max-width: 950px) {

    .home-status {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-status-summary {
        width: 100%;
    }

    .status-mini {
        flex: 1;
    }

    .irrigation-card {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .irrigation-main-action {
        grid-column: 1 / -1;

        width: 100%;

        margin:
            0
            0
            14px;
    }

}


@media (max-width: 760px) {

    .plants-table-header {
        display: none;
    }

    .plant-summary-row {
        grid-template-columns:
            1fr
            1fr;

        gap: 14px;

        padding:
            15px
            17px
            15px
            20px;
    }

    .plant-summary-identity {
        grid-column:
            1 / -1;
    }

    .plant-summary-value {
        justify-content: flex-start;
    }

    .plant-summary-condition {
        grid-column:
            1 / -1;

        justify-content: flex-start;

        padding-top: 10px;

        border-top:
            1px solid #d2dfd8;
    }

    .irrigation-card {
        grid-template-columns: 1fr;
    }

    .irrigation-item {
        padding:
            11px
            0;

        border-left: none;

        border-bottom:
            1px solid #d2dfd8;
    }

    .irrigation-item:nth-child(3) {
        border-bottom: none;
    }

}


@media (max-width: 600px) {

    .home-header h1 {
        font-size: 27px;
    }

    .home-status-summary {
        align-items: stretch;

        flex-direction: column;
    }

    .status-mini {
        width: 100%;

        padding:
            9px
            0;

        border-left: none;

        border-bottom:
            1px solid #d2dfd8;
    }

    .status-mini:last-child {
        border-bottom: none;
    }

    .home-section-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 10px;
    }

    .section-link {
        width: 100%;
    }

}


@media (max-width: 480px) {

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

    .plant-summary-identity,
    .plant-summary-condition {
        grid-column: auto;
    }

}


/* ========================================================= */
/* MENOS MOVIMIENTO                                          */
/* ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .section-link,
    .plant-summary-row,
    .irrigation-main-action {
        transition: none;
    }

}

}

/* ========================================================= */
/* ESTADO VACÍO - PLANTAS                                    */
/* ========================================================= */

.plants-empty-state {
    min-height: 120px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    padding:
        22px;

    color:
        var(--text-primary);

    text-align: left;
}

.plants-empty-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color:
        var(--green-700);

    background:
        var(--green-50);

    border-radius: 10px;
}

.plants-empty-icon svg {
    width: 21px;
    height: 21px;
}

.plants-empty-state > div:last-child {
    display: flex;
    flex-direction: column;
}

.plants-empty-state strong {
    color:
        var(--green-950);

    font-size: 13px;
    font-weight: 850;
}

.plants-empty-state span {
    margin-top: 3px;

    color:
        var(--text-primary);

    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;

    opacity: .75;
}

/* ========================================================= */
/* PLANTAS REALES - INICIO                                   */
/* ========================================================= */

.plants-table-header {
    grid-template-columns:
        minmax(0, 1.7fr)
        minmax(120px, 0.65fr)
        minmax(120px, 0.65fr)
        minmax(170px, 0.8fr);
}


.home-plants-list {
    display: flex;
    flex-direction: column;
}


.home-plant-row {
    min-height: 76px;

    display: grid;

    grid-template-columns:
        minmax(0, 1.7fr)
        minmax(120px, 0.65fr)
        minmax(120px, 0.65fr)
        minmax(170px, 0.8fr);

    align-items: center;

    border-top:
        1px solid var(--border-soft);

    background:
        var(--surface);
}

.home-plant-humidity,
.home-plant-battery {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 14px 16px;
}


.home-plant-status {
    justify-self: center;
}


.home-plant-row:first-child {
    border-top: none;
}


.home-plant-main {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 12px;

    padding:
        14px 18px;
}


.home-plant-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color:
        var(--green-700);

    background:
        var(--green-50);

    border-radius:
        10px;
}


.home-plant-icon svg {
    width: 20px;
    height: 20px;
}


.home-plant-copy {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 3px;
}


.home-plant-copy strong {
    color:
        var(--text-primary);

    font-size:
        14px;

    font-weight:
        800;
}


.home-plant-copy small {
    color:
        var(--text-secondary);

    font-size:
        11px;

    white-space:
        nowrap;

    overflow:
        hidden;

    text-overflow:
        ellipsis;
}


.home-plant-humidity {
    padding:
        14px 16px;
}


.home-plant-humidity strong {
    color:
        var(--text-primary);

    font-size:
        18px;

    font-weight:
        800;
}


.home-plant-status {
    display:
        inline-flex;

    align-items:
        center;

    gap:
        8px;

    justify-self:
        start;

    padding:
        7px 11px;

    border-radius:
        999px;

    font-size:
        12px;
}


.home-plant-status-dot {
    width:
        9px;

    height:
        9px;

    flex-shrink:
        0;

    border-radius:
        50%;
}


.home-plant-status.good {
    color:
        var(--green-800);

    background:
        var(--green-50);
}


.home-plant-status.good
.home-plant-status-dot {
    background:
        var(--green-600);
}


.home-plant-status.needs-water {
    color:
        #765300;

    background:
        #fff4d9;
}


.home-plant-status.needs-water
.home-plant-status-dot {
    background:
        var(--mustard, #CBAB08);
}


.home-plant-status.no-reading,
.home-plant-status.no-profile {
    color:
        var(--text-secondary);

    background:
        var(--background);
}


.home-plant-status.no-reading
.home-plant-status-dot,
.home-plant-status.no-profile
.home-plant-status-dot {
    background:
        var(--text-muted);
}


/* ========================================================= */
/* RESPONSIVE                                                */
/* ========================================================= */

@media (max-width: 760px) {

    .plants-table-header {
        display:
            none;
    }


    .home-plant-row {
        grid-template-columns:
            1fr;

        gap:
            8px;

        padding:
            12px;
    }


    .home-plant-main,
    .home-plant-humidity,
    .home-plant-battery {
        padding: 0;
    }


    .home-plant-status {
        margin-top:
            2px;
    }
}

.home-plant-battery {
    padding: 14px 16px;
}

.home-plant-battery strong {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 800;
}