/* 
 * custom.css - 自定义样式
 * 为产业园区管理系统定制的样式，用于替代Radzen组件样式
 */

/* ===== 全局变量和基础样式 ===== */
:root {
    --primary: #1976d2;
    --secondary: #6c757d;
    --success: #4caf50;
    --info: #03a9f4;
    --warning: #ff9800;
    --danger: #f44336;
    --light: #f8f9fa;
    --dark: #212529;
}

/* ===== 必填项红星标注 ===== */
.required-field .rz-form-field-label::after {
    content: " *";
    color: #f44336;
    font-weight: bold;
    margin-left: 2px;
}

/* 必填项文本标注 */
.required-text::after {
    content: " *";
    color: #f44336;
    font-weight: bold;
    margin-left: 2px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    margin: 0;
    padding: 0;
}

/* ===== 导航和侧边栏 ===== */
.sidebar {
    background-color: #ffffff !important;
    transition: all 0.3s ease;
}

.sidebar-collapsed {
    margin-left: -250px;
}

.nav-link,
.nav-link.active,
.nav-link:hover {
    border-right: none !important;
}

.nav-link::after,
.nav-item::after {
    border-right: none !important;
    background: none !important;
    content: none !important;
}

/* ===== 卡片和容器 ===== */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

/* ===== 按钮样式 ===== */
.btn {
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-success {
    background-color: var(--success);
    border-color: var(--success);
}

.btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* ===== 表单控件 ===== */
.form-control {
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

/* ===== 表格样式 ===== */
.table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.table th {
    font-weight: 500;
    background-color: #f8f9fa;
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===== 提示信息样式 ===== */
.alert {
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border: none;
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.alert-info {
    background-color: rgba(3, 169, 244, 0.1);
    color: #0288d1;
    border-left: 4px solid #03a9f4;
}

.alert-warning {
    background-color: rgba(255, 152, 0, 0.1);
    color: #f57c00;
    border-left: 4px solid #ff9800;
}

.alert-danger {
    background-color: rgba(244, 67, 54, 0.1);
    color: #d32f2f;
    border-left: 4px solid #f44336;
}

/* ===== 徽章样式 ===== */
.badge {
    font-size: 75%;
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
}

/* ===== 数据表格样式 ===== */
.data-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
}

.data-grid th {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    font-weight: 500;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
}

.data-grid td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

.data-grid tr:last-child td {
    border-bottom: none;
}

.data-grid-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.data-grid-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* ===== 加载动画 ===== */
.spinner {
    width: 3rem;
    height: 3rem;
}

.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

/* ===== 仪表盘特定样式 ===== */
.dashboard-container {
    padding: 1rem;
}

.dashboard-card {
    height: 100%;
    transition: all 0.3s ease;
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.dashboard-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.park-icon {
    background-color: #3498db;
}

.building-icon {
    background-color: #2ecc71;
}

.room-icon {
    background-color: #9b59b6;
}

.company-icon {
    background-color: #e74c3c;
}

.area-icon {
    background-color: #f39c12;
}

.rented-icon {
    background-color: #27ae60;
}

.vacant-icon {
    background-color: #7f8c8d;
}

.dashboard-label {
    font-size: 14px;
    color: #6c757d;
}

.dashboard-value {
    font-size: 24px;
    font-weight: 600;
    color: #212529;
}

.dashboard-unit {
    font-size: 14px;
    color: #6c757d;
    font-weight: normal;
}

.dashboard-extra {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.chart-card {
    min-height: 400px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    text-align: center;
}

.no-data-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    font-style: italic;
}

/* 自定义 Bootstrap Nav Tabs 样式 */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 1rem;
}

.nav-tabs .nav-link {
    color: #495057;
    font-weight: bold;
    border: 1px solid transparent;
    border-top-left-radius: .25rem;
    border-top-right-radius: .25rem;
    margin-right: 0.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-tabs .nav-link:hover {
    background-color: #f8f9fa;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    background-color: #e9ecef;
    border-color: #dee2e6 #dee2e6 #fff;
}

/* Tab 内容区域美化 */
.tab-content {
    border: 1px solid #dee2e6;
    border-top: none;
    padding: 1rem;
    background-color: #fff;
}

/* 弹窗表单统一样式 */
.modal .form-label {
    font-weight: 600;
    color: #333;
}

.modal .form-control {
    border-radius: 0.25rem;
}

.modal .btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.modal .btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* 针对 Nav Tab 内容中的表格、列表等控件微调 */
.tab-content dl dt {
    font-weight: 600;
    margin-bottom: .5rem;
    color: #555;
}

.tab-content dl dd {
    margin-bottom: 1rem;
}