* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --sidebar-width-0: 13.6rem;
    --sidebar-width-1: 5rem;
    --web-header-height: 3.4rem;

    --body-background-color: rgb(243, 247, 250);
    --sidebar-color: rgb(255, 255, 255);
    --dropdown-hover-background-color: rgb(244, 248, 255);
    --dropdown-activate-background-color: rgb(164, 189, 237);
    --svg-color:rgb(88, 139, 211);
    --menu-item-activate: rgba(124, 179, 242, 0.9);
    --menu-item-hover: rgba(204, 223, 250, 0.2);
    --card-title-color: rgb(74, 125, 196);
    --btn-color: rgba(108, 164, 227, 0.9);
    --btn-hover-color: rgb(92, 155, 226);
    --modal-title-color: rgb(87, 110, 142);
    --modal-title-background-color: rgba(242, 246, 252, 0.6);
    --input-border-color: rgba(117, 142, 176, 0.6);
    --form-label-color: rgb(86, 96, 105);
    --table-background-color: rgba(239, 243, 253, 0.1);
    --th-color: rgb(109, 165, 224);
    --td-border-bottom-color: rgba(193, 214, 237, 0.5);
    --tr-hover-color: rgba(209, 224, 245, 0.1);
    --table-btn-color: rgba(110, 175, 231, 0.9);
    --table-btn-hover-color: rgb(95, 161, 226);

    --online-color: rgb(5, 207, 160);
    --offline-color: rgb(241, 91, 72);
    --abnormal-color: rgb(255, 191, 0);
}

body {
    display: flex;
    min-height: 100vh;
    background-color: var(--body-background-color);
    color: #333;
}

.align-items {
    align-items: center; 
}

.center {
    text-align: center;
}

.flex {
    display: flex;
}

.web-header {
    display: flex;         
    align-items: center;   
    background-color: #ffffff;
    height: var(--web-header-height);
    position: fixed;   
    top: 0;           
    left: 0;          
    width: 100%;     
    z-index: 999999;  
    box-shadow: 0 3px 4px rgba(132, 184, 208, 0.1);  
    padding: 0 1rem;

}

.logo {
    display: flex;
    align-items: center;  
    margin-left: 0.2rem;
    width: 13.2rem;
    flex-shrink: 0;
}

.logo img {
    width: 2.8rem;
    vertical-align:middle;
}

.logo label {
    display: flex;
    align-items: center; 
    font-size: 1.2rem;
    font-weight: 600;
    color: #35887c;
}

.logo span {
    font-size: 1rem;
    margin-left: 0.4rem;
    color: rgb(122, 180, 170);
}


.farm-select-container {
    position: relative;
    flex-shrink: 0;
}

.farm-select {
    display: flex;
    align-items: center;
    font-size: 0.7rem;
    color: rgb(152, 152, 152);
}

.farm-select:hover {
    cursor: pointer;
    color: rgb(116, 116, 116);
}

.farm-select .arrow {
    width: 0.7rem;
    height: 0.6rem;
    margin-left: 0.3rem;
    transition: transform 0.3s ease;
    position: relative;
}

.farm-select .arrow:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(217, 217, 218);
    clip-path: polygon(50% 70%, 20% 30%, 80% 30%);
}

.farm-select:hover .arrow::before {
    background-color: rgb(205, 205, 208);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.3rem);
    margin-left: -0.5rem;
    background-color: white;
    border-radius: 0.3rem;
    font-size: 0.76rem;
    border: 0.5px solid #eaedf0;
    box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    overflow-y: auto;
    padding: 0.3rem 0.4rem;
    width: max-content;     
    min-width: 100%;       
    white-space: nowrap;  
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    border-radius: 0.3rem;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgb(242, 246, 250);
    color: #4b4b4b;
    display: flex;
    align-items: center;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--dropdown-hover-background-color);
    color: #415b85;
}

.dropdown-item.active {
    background-color: var(--dropdown-activate-background-color);
    color: #fff;
}

.banner-container {
    flex: 1;
    min-width: 0;
    margin-left: 2rem;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.6rem;
    max-width: 80rem;
    margin-left: 1rem;
    margin-right: 6rem;
    border-radius: 0.2rem;
    background-color: rgba(223, 223, 223, 0.2);
}

.banner-content svg:hover {
    cursor: pointer;
    fill: rgb(85, 85, 85)
}

.scroll-container {
    width: calc(100% - 1.8rem);
    white-space: nowrap;    
    overflow: hidden;        
}

.scrolling-text {
    font-size: 0.72rem;
    color: rgb(119, 119, 119);
    animation-name: scroll-left;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.scrolling-text .text {
    white-space: nowrap;
}

.scrolling-text .gap {
    width: 4rem;  
    flex-shrink: 0;
}

@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.user-section-content {
    margin-left: auto;
    margin-right: 0.4rem;  
    width: 8rem;
    flex-shrink: 0;
}

.user-section {
    display: flex;
    align-items: center;
}

.user-section:hover {
    cursor: pointer;
}

.user-section .user-phone {
    font-size: 0.75rem;
    margin-left: 0.3rem;
    color: rgb(122, 122, 122);
}

.user-section .arrow {
    width: 0.7rem;
    height: 0.6rem;
    margin-left: 0.3rem;
    transition: transform 0.3s ease;
    position: relative;
}

.user-section .arrow:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(204, 208, 214);
    clip-path: polygon(50% 70%, 20% 30%, 80% 30%);
}

.user-section-card {
    position: absolute;
    top: calc(100% + 0.2rem);
    margin-left: -1.3rem;
    background-color: white;
    border-radius: 0.4rem;
    font-size: 0.76rem;
    border: 0.5px solid #eaedf0;
    box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    overflow-y: auto;
    padding: 0.3rem 0.8rem;
    width: 10rem;    
    white-space: nowrap;   
}

.user-section-card.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-section-card .name {
    padding: 0.35rem;
    font-size: 0.95rem;
    text-align: center;

}

.user-section-card .admin {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem;
    margin-bottom: 0.1rem;
}

.user-section-card .admin label {
    font-size: 0.7rem;
    margin-left: 0.3rem;
    color: rgb(138, 138, 138);
}

.user-section-card .user-item {
    padding: 0.2rem;
    font-size: 0.66rem;
    text-align: center;
    color: rgb(138, 138, 138);
}

.user-section-btn-content {
    display: flex;
    flex-direction: column; 
    align-items: center;    
    padding: 0.2rem 0;
    margin-top: 0.2rem;
    border-top: 0.8px solid #ebecf1;
    border-bottom: 0.8px solid #ebecf1;
}

.user-section-btn {
    width: 100%;
    font-size: 0.8rem;
    padding: 0.3rem 0rem;
    border-radius: 0.2rem;
    background: transparent; 
    border: none;            
    outline: none;  
    color: rgb(70, 70, 70);       
}

.user-section-btn:hover {
    cursor: pointer;
    background-color: rgb(247, 250, 255);
    color: rgb(69, 68, 132);
   
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width-0);
    margin-top: var(--web-header-height);
    padding: 0.4rem 0.5rem;
    overflow-y: auto;
}

.card-content {
    background-color: #ffffff;
    height: 100%;
    border-radius: 0.4rem;
    padding: 1.2rem 1.6rem;
    box-shadow: 0 1px 1px rgba(92, 91, 91, 0.05);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--card-title-color);
}

.card-head-grid {
    display: grid; 
    grid-template-columns: 1fr auto; 
    align-items: center; 
    padding: 0;
    margin-bottom: 0.4rem;
}

.btn {
    background-color: var(--btn-color);
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 0.8rem;
    cursor: pointer;
    font-size: 0.75rem;
    letter-spacing: 0.01rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--btn-hover-color);
}

.modal-btn {
    background-color: var(--btn-color);
    color: white;
    border: none;
    padding: 0.45rem 0.95rem;
    border-radius: 1rem;
    cursor: pointer;
    font-size: 0.78rem;
    letter-spacing: 0.01rem;
    transition: background-color 0.3s;
}

.modal-btn:hover {
    background-color: var(--btn-hover-color);
}

.table-btn {
    background-color: var(--table-btn-color);
    color: white;
    border: none;
    padding: 0.2rem 0.6rem;
    border-radius: 0.6rem;
    cursor: pointer;
    font-size: 0.68rem;
    letter-spacing: 0.01rem;
    transition: background-color 0.3s;
}

.table-btn:hover {
    background-color: var(--table-btn-hover-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 0.6rem; 
    overflow: hidden; 
    background-color: var(--table-background-color);
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

th {
    background-color: var(--th-color);
    color: white;
    padding: 0.6rem 0.8rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

td {
    padding: 0.55rem 0.8rem;
    font-size: 0.85rem;
    border-bottom: 0.3px solid var(--td-border-bottom-color);
    color: rgba(51, 56, 60, 0.8);
}

tr:hover {
    background-color: var(--tr-hover-color)
}

.select-wrapper {
    position: relative;
    display: inline-block;
}

.select-wrapper select:focus {
    outline: none;
    border-color: #a1bade;
}

.select-wrapper select {
    padding: 0.5rem 0.5rem;
    border: 1px solid rgba(178, 195, 217, 0.6);
    border-radius: 0.4rem;
    background: white;
    width: 12rem;
    color: #333;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.3s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}
  
.select-wrapper .arrow {
    width: 0.7rem;
    height: 0.6rem;
    margin-left: 0.3rem;
    transform: translateY(-50%);
    position: absolute;
    cursor: pointer;
    right: 0.5rem;
    top: 50%;
}

.select-wrapper .arrow:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(173, 197, 230);
    clip-path: polygon(50% 70%, 20% 30%, 80% 30%);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 30rem;
    border-radius: 8px;
    box-shadow: 0 1px 1px rgba(92, 91, 91, 0.1);
    overflow: hidden;
}

.modal-header {
    padding: 0.6rem 1.2rem;
    background-color: var(--modal-title-background-color);
    color: var(--modal-title-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-body {
    padding: 1.2rem 2rem 0.5rem 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding-top: 0.2rem;
    padding-bottom: 1.4rem;
    padding-right: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.notification {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.8rem 1.4rem;
    border-radius: 0.4rem;
    color: rgb(255, 255, 255);
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 9999999;
    transition: top 0.4s ease-out;
    max-width: 50rem;
    display: flex;
    align-items: center;
}

.notification.show {
    top: 2rem;
}

.notification.success {
    background: #63bb80;
    color: #ffffff;
}

.notification.error {
    background: #eb5858;
    color: #ffffff;
}

.notification.warning {
    background: #ffb007;
    color: #ffffff;
}

.notification i {
    margin-right: 10px;
    font-size: 1.2em;
}

.note {
    color: #d94444;
    margin-left: 3px;
    font-size: 0.75rem;
}

.comment {
    font-size: 0.7rem;
    color: rgba(112, 112, 112, 0.75);
    margin-top: 0.22rem;
    margin-left: 0.5rem;
}

.input-with-icon {
    position: relative;
}

.toggle-password {
    font-size: 0.78rem;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: rgba(185, 185, 185, 0.8);
    z-index: 10;
}

.close {
    cursor: pointer;
}

@media (max-width: 768px) {
    .main-content {
        margin-left: var(--sidebar-width-1);
    }
}