﻿html {
    font-size: 13px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
    margin: 0;
}

body {
    /*margin-bottom: 60px;*/
    background: linear-gradient(180deg, #006d2d, #023c23);
    color: #333;
    height: 100%;
    margin: 0;
    font-family: 'BeVietnamPro', sans-serif;
    /*font-family: 'Be Vietnam Pro' !important, sans-serif;*/
}

h1, h2, h3, h1, h5, h6 {
    font-family: 'BeVietnamPro', sans-serif !important;
}

.card {
    background-color: #fff;
    border: none;
}

    .card h3 {
        color: #198754;
    }

.btn-primary {
    background-color: #198754;
    border: none;
    transition: background-color 0.3s;
}

    .btn-primary:hover {
        background-color: #74b9ff;
    }



/*======== CSS TRANG QUẢN LÝ NÔNG TRẠI ===========*/

.farm-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    /*justify-content: flex-start;*/
    justify-content: center;
}

.farm-item {
    position: relative;
    width: 250px;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    margin: 30px auto 30px auto;
    border: 1px solid #ececec;
}

    .farm-item:hover {
        transform: scale(1.05);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    .farm-item img {
        width: 160px;
        height: 160px;
        object-fit: contain;
    }

    .farm-item .farm-name {
        font-size: 16px;
        font-weight: bold;
        margin-top: 10px;
        margin-bottom: 20px;
    }

    .farm-item .farm-info {
        font-size: 13px;
        color: #666;
        width: 100%;
    }

        .farm-item .farm-info p {
            font-weight: bolder;
            line-height: 17px;
        }

            .farm-item .farm-info p.active {
                color: green;
                font-weight: bolder;
            }

            .farm-item .farm-info p.closed {
                color: #131313;
                font-weight: bolder;
                /*text-decoration: line-through;*/
            }

            .farm-item .farm-info p.upcoming {
                color: orangered;
                font-weight: bolder;
            }

/* Vị trí và style của icon trạng thái */
.status-icon {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 20px;
    z-index: 1;
}

/* Màu sắc theo trạng thái */
.farm-item.active img {
    filter: none;
}

.farm-item.closed img {
    filter: grayscale(100%);
}

.farm-item.upcoming img {
    filter: brightness(2.0);
}

/*Phần popup thông tin*/
.modal-body p {
    margin-bottom: 10px;
}




/*======== END CSS TRANG QUẢN LÝ NÔNG TRẠI =========*/


/* ================= CHI TIẾT LUỐNG CÂY=================== */
#planting-grid {
    display: grid;
    grid-template-columns: repeat(20, 50px); /* 20 cột, mỗi ô 50px */
    grid-gap: 8px;
    margin: 20px;
    margin-top: 10px !important;
}

.row-plan {
    position: relative;
    width: 100%;
}

.plant-cell-head {
    width: 54px;
    height: 62px;
    background-color: #96b3b0;
    position: relative;
    text-align: center;
    float: left;
}

.plant-cell {
    width: 62px;
    height: 62px;
    background-color: #96b3b0;
    position: relative;
    text-align: center;
    float: left;
    cursor: pointer;
}

    .plant-cell:hover {
        background-color: #d0bc46 !important;
    }

.plant-cell-selected {
    background-color: #b0a045 !important;
}

.plant-cell-noconfirm {
    background-color: #e8e8e8;
}

.plant-cell .status {
    width: 40px;
    height: 40px;
    margin: 5px auto;
    border-radius: 20%;
    display: block;
}

.status.empty {
    background-color: #e0e0e0;
    background-image: url('../image/farm-icon/tree-unplanted.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    filter: brightness(1.5);
}

.status.planted {
    background-color: #9b9b9b;
    background-image: url('../image/farm-icon/tree-planted.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    filter: brightness(1.5);
    border: solid 1px #023c05;
}

.status.sicked {
    background-color: #755e19;
    background-image: url('../image/farm-icon/tree-sicked.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    filter: brightness(1.2);
    border: solid 1px #5b4500;
}

.status.harvested {
    background-color: #eaa;
    background-image: url('../image/farm-icon/tree-harvested.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    filter: brightness(1.2);
    border: solid 1px #ff3000;
}

.status a.tree-index {
    font-size: 10px;
    background-color: #e9e9e9;
    border-radius: 4px;
    color: #333232;
    padding: 1px 6px;
    position: relative;
    top: 34px;
    font-weight: bold;
}


.status.empty-note {
    background-color: #e0e0e0;
    background-image: url('../image/farm-icon/tree-unplanted.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    filter: brightness(1.5);
    border: solid 1px #023c05;
    width: 34px !important;
    position: relative;
    float: left;
    height: 34px !important;
    border-radius: 3px;
}

.status.planted-note {
    background-color: #9b9b9b;
    background-image: url('../image/farm-icon/tree-planted.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    filter: brightness(1.5);
    border: solid 1px #023c05;
    width: 34px !important;
    position: relative;
    float: left;
    height: 34px !important;
    border-radius: 3px;
}

.status.sicked-note {
    background-color: #755e19;
    background-image: url('../image/farm-icon/tree-sicked.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    filter: brightness(1.2);
    border: solid 1px #5b4500;
    width: 34px !important;
    position: relative;
    float: left;
    height: 34px !important;
    border-radius: 3px;
}

.status.harvested-note {
    background-color: #eaa;
    background-image: url('../image/farm-icon/tree-harvested.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    filter: brightness(1.2);
    border: solid 1px #ff3000;
    width: 34px !important;
    position: relative;
    float: left;
    height: 34px !important;
    border-radius: 3px;
}

.label_note {
    padding: 5px;
    line-height: 25px;
    float: left;
    margin-right: 10px;
    /*    font-weight: bolder;*/
}

.row_ghichu {
    position: relative;
    width: 100% !important;
    background: #f9f9f9;
    padding: 5px;
    border: 1px solid #ececec;
    border-radius: 3px;
    margin-bottom: 10px;
}

.h5_title_note {
    height: 30px;
    line-height: 15px;
    padding: 5px;
    color: #f7ff00;
    margin: 0px;
    margin-bottom: 0px !important;
}

/* Màn hình loading khi xác nhận luông */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Nền mờ */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    border: 16px solid #f3f3f3; /* Light grey */
    border-top: 16px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.img-detail {
    height: auto;
    width: 60%;
    margin-top: 20px;
    border: solid 5px #fff;
    border-radius: 9px;
    box-shadow: aqua 3px;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.3);
}



/* -------------------- SLIDE ALBUM ẢNH CÂY -------------------*/
.image-gallery {
    display: flex;
    width: 100%;
    margin-top: 10px;
}

.main-image {
    width: 80%;
    height: 400px;
    text-align: center;
    border: solid 1px #ededed;
    border-radius: 5px;
    position: relative;
}

    .main-image img#main-img {
        height: 90%;
        max-width: 88%; /* Thêm thuộc tính này */
        height: auto; /* Thêm thuộc tính này */
        max-height: 360px;
    }

#image-index {
    position: absolute; /* Đặt vị trí tuyệt đối cho label */
    top: 10px;
    left: 10px;
    background-color: rgba(208, 208, 208, 0.7);
    padding: 5px;
    border-radius: 3px;
}

.thumbnail-list {
    width: 20%;
    height: 400px;
    overflow-y: hidden;
    text-align: center;
}

    .thumbnail-list img {
        width: 80%;
        height: auto;
        margin: 5px;
        cursor: pointer;
        border: solid 2px #bfbfbf;
    }

        .thumbnail-list img.selected {
            border: solid 3px red; /* Hiển thị viền đỏ khi ảnh được chọn */
        }


/*======================================================================*/

.trace-bg {
    margin: 0;
    background: linear-gradient(180deg, #f5f5f5, #f5f5f5);
}

.background-wrapper {
    width: 100% !important;
    height: 100% !important;
    position: relative;
    float: left;
}

.box_cener {
    width: 100%;
    border-radius: 6px !important;
    border: 2px solid #003c22;
    margin-top: 12px;
    margin-bottom: 20px;
    padding: 0px !important;
    height: auto !important;
    min-height: 920px;
    background: linear-gradient(180deg, #f5f5f5, #f5f5f5);
}

.h3_title {
    padding: 10px !important;
    background-color: rgb(0, 64, 37);
    font-weight: bolder;
    color: #fff;
    font-size: 20px;
    position: relative;
    float: left;
    width: 100%;
}

.p_PathParent {
    padding: 10px 10px;
    color: #700202;
    font-size: 16px;
    background-color: #eaeaea;
    border: solid 1px #ddd;
    width: 100%;
    position: relative;
    float: left;
    border-radius: 9px;
}

.h3_tencay {
    position: relative;
    float: left;
    width: 100%;
    margin-top: 15px;
    margin-bottom: 10px;
    color: red;
    color: #c10000;
    font-size: 24px;
    font-weight: bold;
}

/*--------------------- Thông tin dashboard ----------------------*/
.container-00 {
    max-width: 100%;
    margin: 0px auto;
    margin-bottom: 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.row {
    display: flex;
    border-bottom: 1px solid #ddd;
}

    .row:last-child {
        border-bottom: none;
    }

.header-cell {
    background-color: #5cb85c;
    flex: 1; /* Chia đều không gian */
    color: white;
    font-weight: bold;
    padding: 12px 15px;
    text-align: center;
    box-sizing: border-box;
}

.data-cell {
    background: #e6e6e6;
    flex: 1; /* Chia đều không gian */
    padding: 12px 15px;
    text-align: center;
    color: #2f2f2f;
    box-sizing: border-box;
    font-size: 27px;
    font-weight: bold;
    border-radius: 5px;
}

.combined-cell {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px 15px;
    box-sizing: border-box;
}

    .combined-cell .header-cell {
        background-color: #005330;
        color: rgb(255, 255, 255);
        font-weight: bold;
        padding: 0px;
        margin-bottom: 5px;
        padding: 10px 5px;
    }

    .combined-cell .data-cell {
        padding: 10px;
    }


.pie {
    margin: 0px auto;
    border-radius: 50%;
    width: 250px;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(-21deg, #2196f3 50%, transparent 50%), linear-gradient(to right, #2196f3 50%, #ffc107 50%);
}



/*Sơ đồ hình cây trên màn hình dashboard*/

.label-sodo {
    position: relative;
    text-align: center;
    font-size: 20px;
    padding: 20px 0px 5px 0px;
    margin: 0px;
    font-weight: bold;
}

.tree {
    width: auto !important;
    margin: 50px auto;
    text-align: center;
    /*background: red;*/
}

    .tree ul {
        padding-top: 20px;
        position: relative;
        transition: all 0.5s;
    }

    .tree li {
        float: left;
        text-align: center;
        list-style-type: none;
        position: relative;
        padding: 20px 5px 0 5px;
        transition: all 0.5s;
        margin-bottom: 10px;
    }

        .tree li::before,
        .tree li::after {
            content: "";
            position: absolute;
            top: 0;
            right: 50%;
            border-top: 3px solid #999;
            width: 50%;
            height: 20px;
        }

        .tree li::after {
            right: auto;
            left: 50%;
            border-left: 3px solid #999;
        }

        .tree li:only-child::after,
        .tree li:only-child::before {
            display: none;
        }

        .tree li:only-child {
            padding-top: 0;
        }

        .tree li:first-child::before,
        .tree li:last-child::after {
            border: 0 none;
        }

        .tree li:last-child::before {
            border-right: 3px solid #999;
            border-radius: 0 5px 0 0;
        }

        .tree li:first-child::after {
            border-radius: 5px 0 0 0;
        }

    .tree ul ul::before {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        border-left: 3px solid #999;
        width: 0;
        height: 20px;
    }

    .tree li a {
        border: 1px solid #999;
        border-top: 3px solid #4d4d4d;
        padding: 5px 10px;
        text-decoration: none;
        color: #3c3c3c;
        font-family: arial, verdana, tahoma;
        font-size: 16px;
        display: inline-block;
        border-radius: 0px;
        transition: all 0.5s;
        background: #eee;
    }

        .tree li a:hover,
        .tree li a:hover + ul li a {
            background: #9cfd65;
            color: #000;
            border: 1px solid #94a0b4;
            border-top: 3px solid #94a0b4;
        }

            .tree li a:hover + ul li::after,
            .tree li a:hover + ul li::before,
            .tree li a:hover + ul::before,
            .tree li a:hover + ul ul::before {
                border-color: #94a0b4;
            }

        .tree li a.lb-nongtrai {
            background-color: #00dbc6;
            font-weight: bolder;
        }

        .tree li a.lb-phankhu {
            background-color: #00ff93;
        }

    .tree li span {
        font-family: Arial;
        font-size: 13px;
    }

    .tree li div {
        background-color: #e4f7d9;
        border-radius: 3px;
        border: dashed 1px #9b9b9b;
        margin-top: 10px;
        padding: 7px 0px;
    }

        .tree li div p {
            font-weight: bolder;
            margin: 0px !important;
            text-align: left;
        }

.chart-number-label {
    padding: 3px 5px;
    background: #ff3000;
    margin-left: 3px;
    border-radius: 3px;
    font-size: 12px;
    font-weight:bold;
    color:#fff;
}
