/* 物资管理样式 */

.taoswin {
    height: calc(100% - 30px !important);
}

div#page-primary {
    padding-bottom: 70px !important;
}

/* 资产统计 */
.itembook-stats {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.itembook-stats h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.itembook-stats-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.itembook-stat-item {
    flex: 1;
    min-width: 200px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.itembook-stat-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #666;
}

.itembook-stat-item .value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* 资产列表 */
.itembook-list {
    margin-bottom: 30px;
}

.itembook-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.itembook-controls h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.itembook-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
}

.itembook-per-page label {
    font-size: 14px;
    color: #666;
}

.itembook-per-page select {
    padding: 5px 10px;
    border: 1px solid #ddd;
}

/* 状态分类筛选 */
.itembook-status-filter,
.itembook-category-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 14px;
    color: #666;
    font-weight: bold;
}

.status-tag,
.category-tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
}

.status-tag:hover,
.category-tag:hover {
    background: #f0f0f0;
}

.status-tag.active,
.category-tag.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.status-tag.status-active {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #4caf50;
}

.status-tag.status-active.active {
    background: #4caf50;
    color: white;
}

.status-tag.status-retired {
    background: #fff3e0;
    color: #ef6c00;
    border-color: #ff9800;
}

.status-tag.status-retired.active {
    background: #ff9800;
    color: white;
}

.status-tag.status-sold {
    background: #f5f5f5;
    color: #616161;
    border-color: #9e9e9e;
}

.status-tag.status-sold.active {
    background: #9e9e9e;
    color: white;
}

.category-more {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #2196f3;
}

.category-more:hover {
    background: #bbdefb;
}

/* 分类弹窗 */
.itembook-category-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.itembook-category-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    width: 90%;
}

.itembook-category-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.itembook-category-modal-close:hover {
    color: #333;
}

.itembook-category-modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.itembook-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.itembook-category-list a {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    background: #f0f0f0;
    color: #333;
    transition: all 0.3s ease;
}

.itembook-category-list a:hover {
    background: #007bff;
    color: white;
    border-radius: 4px;
    font-size: 14px;
}

.itembook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.itembook-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0px 1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px #dedede solid;
    display: flex;
    flex-direction: column;
}

.itembook-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.itembook-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 15px 15px 0;
}

.itembook-item-image {
    width: 80px;
    height: auto;
    object-fit: cover;
    max-height: 80px;
    border-radius: 11px;
    overflow: hidden;
    margin: 0;
    transform: rotate(7deg);
    box-sizing: border-box;
    box-shadow: 1px 1px 7px #ececec;
    border: 4px #ffffff solid;
}

.itembook-item-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.itembook-item-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.itembook-item-price-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.itembook-item-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    align-self: flex-start;
}

.itembook-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.itembook-item-status.status-active {
    background-color: #4CAF50;
    color: white;
}

.itembook-item-status.status-retired {
    background-color: #FF9800;
    color: white;
}

.itembook-item-status.status-sold {
    background-color: #9E9E9E;
    color: white;
}

.itembook-item-evaluation {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.itembook-item-evaluation span {
    padding: 1px 3px 1px 3px;
    border-radius: 7px;
    border: 1px #d4d4d4 solid;
    background-color: #ededed;
}

.itembook-item-price {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.itembook-item-original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.itembook-item-daily {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.itembook-item-days {
    font-size: 14px;
    color: #888;
    margin-top: 5px;
    font-style: italic;
}

/* 分页 */
.itembook-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.itembook-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
}

.itembook-pagination li {
    display: inline;
}

.itembook-pagination a {
    display: block;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.itembook-pagination a:hover {
    background: #f0f0f0;
}

.itembook-pagination .current {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* 弹窗样式 */
.itembook-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.itembook-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    width: 90%;
}

.itembook-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.itembook-modal-close:hover {
    color: #333;
}

.itembook-modal-header h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.itembook-modal-info-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.itembook-modal-image {
    flex: 0 0 200px;
}

.itembook-modal-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.itembook-modal-details {
    flex: 1;
    min-width: 300px;
}

.itembook-modal-details p {
    margin: 10px 0;
}

.itembook-modal-description-section h3,
.itembook-modal-expenses h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}

.itembook-modal-description-section {
    margin-top: 20px;
}

.itembook-modal-description {
    line-height: 1.6;
    color: #333;
}

.itembook-modal-expenses {
    margin-top: 30px;
}

.itembook-modal-expenses h3 {
    margin-top: 20px;
    margin-bottom: 15px;
    color: #333;
}

.itembook-modal-estimated-expenses ul,
.itembook-modal-actual-expenses ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.itembook-modal-estimated-expenses li,
.itembook-modal-actual-expenses li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.itembook-modal-estimated-expenses li img,
.itembook-modal-actual-expenses li img {
    flex: 0 0 50px;
}

.itembook-modal-estimated-expenses li span:first-of-type,
.itembook-modal-actual-expenses li span:first-of-type {
    flex: 1;
}

.itembook-modal-estimated-expenses li span:last-of-type,
.itembook-modal-actual-expenses li span:last-of-type {
    flex: 0 0 auto;
    text-align: right;
}

.itembook-nav {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 10px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 100;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,123,255,0.2);
}

.itembook-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.itembook-nav li {
    display: inline;
}

.itembook-nav a {
    display: block;
    padding: 8px 16px;
    background: #007bff;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    position: relative;
    z-index: 101;
    min-width: 80px;
    text-align: center;
    border: 1px solid #007bff;
}

.itembook-nav a:hover {
    background: white;
    color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

/* 统计和说明窗口 */
.itembook-modal-stats,
.itembook-modal-info {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.itembook-modal-stats-content,
.itembook-modal-info-content {
    background: #fff;
    border-radius: 8px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    width: 90%;
}

.itembook-modal-stats-close,
.itembook-modal-info-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.itembook-modal-stats-close:hover,
.itembook-modal-info-close:hover {
    color: #333;
}

.itembook-modal-stats h2,
.itembook-modal-info h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.itembook-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.itembook-stats-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.itembook-stats-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #666;
}

.itembook-stats-item .value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .itembook-stats-container {
        flex-direction: column;
    }
    
    .itembook-modal-info-section {
        flex-direction: column;
    }
    
    .itembook-modal-image {
        flex: 0 0 100%;
    }
    
    .itembook-grid {
        grid-template-columns: 1fr;
    }
    
    .itembook-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .itembook-nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .itembook-stats-grid {
        grid-template-columns: 1fr;
    }
}