/* 自定义样式 */

/* 侧边栏折叠样式 */
.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .sidebar-logo span,
.sidebar.collapsed .menu-item span {
    display: none;
}

.sidebar.collapsed .menu-item {
    text-align: center;
}

.sidebar.collapsed .menu-item i {
    margin-right: 0;
}

.main-content.expanded {
    margin-left: 60px;
}

/* 链接样式 */
a {
    color: inherit;
    text-decoration: none;
}

.menu-item a {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* 侧边栏优化 */
.sidebar {
    position: fixed;
    height: 100%;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 220px;
    transition: all 0.3s;
}

.main-content {
    margin-left: 220px;
    transition: all 0.3s;
    width: calc(100% - 220px);
}

.menu-item {
    padding: 15px 20px;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--primary-color);
}

.menu-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--primary-color);
}

.menu-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* 表单搜索区域 */
.search-area {
    background-color: #fff;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-form .form-group {
    flex: 1;
    min-width: 200px;
}

.search-form .btn-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

/* 表格操作按钮 */
.table-actions {
    display: flex;
    gap: 5px;
}

.table-actions .btn {
    padding: 4px 8px;
    font-size: 12px;
}

/* 图片预览 */
.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.image-preview-item {
    width: 100px;
    height: 100px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-remove {
    position: absolute;
    top: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* 仪表盘卡片 */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.dashboard-card {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    display: flex;
    flex-direction: column;
}

.dashboard-card-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.dashboard-card-value {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.dashboard-card-footer {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    font-size: 12px;
    color: var(--text-secondary);
}

/* 收租提醒卡片 */
.reminder-card {
    background-color: #fff;
    border-radius: 4px;
    padding: 15px;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    margin-bottom: 15px;
    border-left: 3px solid var(--warning-color);
}

.reminder-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.reminder-title {
    font-weight: 500;
    color: var(--text-primary);
}

.reminder-date {
    color: var(--text-secondary);
    font-size: 12px;
}

.reminder-content {
    margin-bottom: 10px;
}

.reminder-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 房屋详情 */
.house-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.house-images {
    flex: 0 0 300px;
}

.house-info {
    flex: 1;
    min-width: 300px;
}

.house-image-main {
    width: 100%;
    height: 200px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.house-image-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.house-image-thumbs {
    display: flex;
    gap: 5px;
}

.house-image-thumb {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

.house-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.house-image-thumb.active {
    border: 2px solid var(--primary-color);
}

.info-group {
    margin-bottom: 15px;
}

.info-label {
    font-weight: 500;
    color: var(--text-primary);
}

.info-value {
    color: var(--text-regular);
}

/* 统计图表容器 */
.chart-container {
    background-color: #fff;
    border-radius: 4px;
    padding: 15px;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    margin-bottom: 20px;
}

.chart-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.chart {
    height: 300px;
}

/* 布局调整 */
.container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.content {
    padding: 20px;
    background-color: #f0f2f5;
    min-height: calc(100vh - 50px);
}

.header {
    position: fixed;
    top: 0;
    right: 0;
    width: calc(100% - 220px);
    z-index: 999;
    transition: all 0.3s;
}

.header.expanded {
    width: calc(100% - 60px);
}

.page-header {
    background-color: transparent;
    padding: 0;
    margin-bottom: 20px;
}

.page-title {
    font-size: 20px;
    font-weight: 500;
    color: #000;
    margin-bottom: 5px;
}

/* 表格样式优化 */
.table th {
    background-color: #fafafa;
    font-weight: 500;
}

.table-responsive {
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
}

/* 按钮样式优化 */
.btn {
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #1890ff;
    border-color: #1890ff;
}

.btn-primary:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

.btn-success {
    background-color: #52c41a;
    border-color: #52c41a;
}

.btn-success:hover {
    background-color: #73d13d;
    border-color: #73d13d;
}

.btn-danger {
    background-color: #f5222d;
    border-color: #f5222d;
}

.btn-danger:hover {
    background-color: #ff4d4f;
    border-color: #ff4d4f;
}

.btn-warning {
    background-color: #faad14;
    border-color: #faad14;
}

.btn-warning:hover {
    background-color: #ffc53d;
    border-color: #ffc53d;
}

.btn-info {
    background-color: #13c2c2;
    border-color: #13c2c2;
}

.btn-info:hover {
    background-color: #36cfc9;
    border-color: #36cfc9;
}

.btn-default {
    background-color: #fff;
    border: 1px solid #d9d9d9;
    color: rgba(0, 0, 0, 0.65);
}

.btn-default:hover {
    color: #40a9ff;
    border-color: #40a9ff;
}

/* 表单样式优化 */
.form-control {
    border-radius: 4px;
    border: 1px solid #d9d9d9;
    padding: 8px 12px;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #40a9ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
}

/* 卡片样式优化 */
.card {
    border: none;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    margin-bottom: 20px;
}

.card-header {
    background-color: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* 分页样式优化 */
.pagination {
    margin-top: 20px;
}

.page-link {
    border-radius: 4px;
    margin: 0 5px;
    color: rgba(0, 0, 0, 0.65);
}

.page-item.active .page-link {
    background-color: #1890ff;
    border-color: #1890ff;
}

/* 自动完成容器样式 */
.suggestions-container {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #d9d9d9;
    border-top: none;
    z-index: 1000;
    display: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.suggestion-item:hover {
    background-color: #e6f7ff;
}

.auto-complete-container {
    position: relative;
}

/* 响应式表格 */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar-logo {
        justify-content: center;
        padding: 0;
    }
    
    .sidebar-logo span,
    .menu-item span {
        display: none;
    }
    
    .menu-item {
        text-align: center;
    }
    
    .menu-item i {
        margin-right: 0;
    }
    
    .main-content {
        margin-left: 60px;
        width: calc(100% - 60px);
    }
    
    .header {
        width: calc(100% - 60px);
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .house-detail {
        flex-direction: column;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-form .form-group {
        width: 100%;
    }
    
    .search-form .btn-group {
        width: 100%;
        justify-content: flex-end;
    }
}