/*去掉边距*/
body {
    border-radius: 10px;
    margin: 0;
    width: 100%;
    font-size: min(1.7vh, 1vw);
}

/*去掉列表的点*/
li {
    list-style: none;
}

/*去掉链接下划线*/
a {
    text-decoration: none;
}

.flex_box {
    display: flex;
    height: 100%;
    width: 100%;
}

/*居中*/
.center {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
}

/* 禁止选择文本 */
.no-select {
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* 标准语法 */

    /* 隐藏光标 */
    cursor: default; /* 设置为默认箭头光标 */
}

.no_wrap {
    white-space: nowrap;
}

.button button {
    height: auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 28px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    letter-spacing: 1px;
}

.button button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.button button:active {
    transform: translateY(-1px);
}

/* 管理页面通用表格样式 */
table {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

td {
    height: auto;
    font-size: 14px;
    padding: 14px 12px;
    color: rgba(255, 255, 255, 0.9);
}

th {
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.4) 100%);
    color: #ffffff;
    padding: 16px 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
}

th, td {
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
}

tbody tr {
    transition: all 0.3s ease;
}

tbody tr:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
}

tbody tr:last-child td {
    border-bottom: none;
}


.input {
    display: flex;
    align-items: center;
}

.input label {
    width: 20%;
    font-weight: 600;
    margin-right: 10px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.input input, .input select {
    width: 50%;
    flex-grow: 1;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    color: #ffffff;
}

.input input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* 输入框聚焦时边框颜色 */
.input input:focus, .input select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

input, select {
    background: rgba(255, 255, 255, 0.1);
}

.input select option {
    background: #667eea;
    color: #ffffff;
}


.newItemForm_bg {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    height: auto;
    width: 550px;
    max-width: 90vw;
    position: fixed;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 35px 40px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    box-sizing: border-box;
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow-y: visible;
    overflow-x: hidden;
    max-height: 90vh;
}

/* 商品管理、用户管理等搜索框区域 */
.products_option .search_box {
    width: 100%;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.products_option .search_box .input input[type="text"],
.products_option .search_box .input input[type="date"],
.products_option .search_box .input select {
    flex: 1;
    min-width: 150px;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(5px);
}

.products_option .search_box .input input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.products_option .search_box .input input:focus,
.products_option .search_box .input select:focus {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.products_option .search_box .input button {
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 1px;
}

.products_option .search_box .input button:not(.add_button) {
    background: rgba(108, 117, 125, 0.6);
    color: white;
    backdrop-filter: blur(5px);
}

.products_option .search_box .input button:not(.add_button):hover {
    background: rgba(90, 98, 104, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.products_option .search_box .input .add_button {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) !important;
    color: white !important;
    padding: 12px 28px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
    letter-spacing: 1px;
}

.products_option .search_box .input .add_button:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%) !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.6);
}

.newItemForm {
    margin: auto;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.newItemForm::-webkit-scrollbar {
    display: none;
}

.newItemForm {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.newItemForm .input label {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.newItemForm .input input,
.newItemForm .input select,
.newItemForm .input textarea {
    color: #ffffff !important;
}

.newItemForm .input input::placeholder,
.newItemForm .input textarea::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.pagination {
    margin: 30px auto;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination button {
    margin-right: 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 18px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.pagination button:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 模态样式 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 1000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.17);
}

/* 关闭按钮样式 */
.close {
    font-size: min(5vw, 10vh);
    color: #f1f1f1;
    position: absolute;
    top: 7vh;
    right: 35vw;
    font-weight: bold;
    cursor: pointer;
}

/* 模态图片样式 */
.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
}

@media (max-height: 800px) {
    body {
        height: 200vh;
    }
}

@media (max-width: 1000px) {
    .hide {
        display: none;
    }

    .newItemForm_bg {
        width: 80vw;
        left: 10vw;
        font-size: 10px;
    }

    th, td {
        padding: 1vw;
    }

    .button button {
        margin-top: 1vw;
        margin-bottom: 1vw;
    }

}

/* Toast 提示框样式 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background-color: rgba(40, 167, 69, 0.9);
}

.toast.error {
    background-color: rgba(220, 53, 69, 0.9);
}
