/* 茶叶管理页面 - 茶文化主题样式 */

/* 页面容器 */
.user-management-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--light-skin) 0%, #f5f1eb 100%);
}

/* 页面头部 */
.management-header {
    background: linear-gradient(135deg, #2d5016 0%, #4a7c59 50%, #6b8e23 100%);
    color: var(--white);
    padding: 2rem 0;
    box-shadow: 0 4px 20px rgba(45, 80, 22, 0.15);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-title i {
    font-size: 2rem;
    color: #90EE90;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.page-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--white);
}

.page-title .subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    margin-top: 0.25rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* 按钮样式 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #228B22, #32CD32);
    color: var(--white);
    box-shadow: 0 2px 10px rgba(34, 139, 34, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e7e1e, #2eb82e);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.4);
}

.btn-secondary {
    background: rgb(144, 238, 144);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* 统计卡片 */
.stats-section {
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(45, 80, 22, 0.08);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    border-left: 5px solid #228B22;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(45, 80, 22, 0.12);
}

.stat-card i {
    font-size: 2.5rem;
    color: #228B22;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 139, 34, 0.1);
    border-radius: 50%;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d5016;
    margin: 0 0 0.25rem 0;
}

.stat-content p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.95rem;
}

/* 筛选区域 */
.filter-section {
    padding: 2rem 0;
    background: var(--white);
    border-radius: 15px;
    margin: 0 1rem 2rem 1rem;
    box-shadow: 0 2px 10px rgba(45, 80, 22, 0.05);
}

.filter-bar {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-group {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    z-index: 1;
}

.search-group input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--light-skin);
}

.search-group input:focus {
    outline: none;
    border-color: #228B22;
    box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.1);
}

.filter-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-group select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.9rem;
    background: var(--light-skin);
    transition: all 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #228B22;
}

/* 表格样式 */
.table-section {
    padding: 2rem 0;
}

.table-container {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(45, 80, 22, 0.08);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 2px solid #dee2e6;
}

.table-header h3 {
    margin: 0;
    color: #2d5016;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-actions {
    color: var(--text-light);
    font-size: 0.9rem;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: linear-gradient(135deg, #2d5016, #4a7c59);
    color: var(--white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 2px solid #dee2e6;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: all 0.3s ease;
}

.data-table tbody tr:hover {
    background: rgba(34, 139, 34, 0.05);
}

/* 茶叶缩略图 */
.tea-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

/* 茶叶名称 */
.tea-name {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tea-name strong {
    color: #2d5016;
    font-weight: 600;
}

.tea-name .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, #228B22, #32CD32);
    color: var(--white);
    border-radius: 12px;
    font-weight: 500;
}

/* 分类标签 */
.category-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-green {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: var(--white);
}

.category-black {
    background: linear-gradient(135deg, #424242, #616161);
    color: var(--white);
}

.category-oolong {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    color: var(--white);
}

.category-white {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    color: #424242;
}

.category-puer {
    background: linear-gradient(135deg, #8d6e63, #a1887f);
    color: var(--white);
}

.category-yellow {
    background: linear-gradient(135deg, #ffd54f, #ffeb3b);
    color: #424242;
}

/* 价格样式 */
.price {
    font-weight: 600;
    color: #2d5016;
    font-size: 1rem;
}

/* 库存状态 */
.stock-low {
    color: #d32f2f;
    font-weight: 600;
}

.stock-normal {
    color: #388e3c;
    font-weight: 500;
}

/* 状态标签 */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: var(--white);
}

.status-inactive {
    background: linear-gradient(135deg, #9e9e9e, #bdbdbd);
    color: var(--white);
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.edit-btn {
    background: linear-gradient(135deg, #2196f3, #42a5f5);
    color: var(--white);
}

.edit-btn:hover {
    background: linear-gradient(135deg, #1976d2, #1e88e5);
    transform: scale(1.1);
}

.delete-btn {
    background: linear-gradient(135deg, #f44336, #ef5350);
    color: var(--white);
}

.delete-btn:hover {
    background: linear-gradient(135deg, #d32f2f, #c62828);
    transform: scale(1.1);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--white);
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #2d5016, #4a7c59);
    color: var(--white);
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-weight: 600;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--white);
}

.modal-body {
    padding: 2rem;
}

/* 表单样式 */
.form-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 250px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #2d5016;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #228B22;
    box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 0;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #dee2e6;
    background: var(--white);
    color: #2d5016;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-btn:hover {
    background: #f8f9fa;
    border-color: #228B22;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #228B22, #32CD32);
    color: var(--white);
    border-color: #228B22;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 空数据样式 */
.no-data {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.no-data i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.no-data p {
    font-size: 1.1rem;
    margin: 0;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.loading i {
    font-size: 2rem;
    color: #228B22;
    margin-bottom: 1rem;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: var(--white);
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideIn 0.3s ease;
}

.toast-success {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
}

.toast-error {
    background: linear-gradient(135deg, #f44336, #ef5350);
}

.toast-info {
    background: linear-gradient(135deg, #2196f3, #42a5f5);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-title h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .tea-thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
}