/**
 * 注册地址管理系统 - 自定义样式
 *
 * 前缀约定：am- (address-management)
 * 包含状态标签颜色、到期预警高亮、表单间距等。
 */

/* ==================== 全局 ==================== */
body {
    background-color: #f5f7fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 主内容区域最小高度 */
main.container-fluid {
    min-height: calc(100vh - 56px);
}

/* ==================== 状态标签颜色 ==================== */

/* 隔间状态 */
.am-status-idle {
    background-color: #198754 !important;
    color: #fff !important;
}

.am-status-sold {
    background-color: #0d6efd !important;
    color: #fff !important;
}

.am-status-applying {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.am-status-own-use {
    background-color: #6f42c1 !important;
    color: #fff !important;
}

/* 销售记录状态 */
.am-status-active {
    background-color: #198754 !important;
    color: #fff !important;
}

.am-status-expired {
    background-color: #6c757d !important;
    color: #fff !important;
}

.am-status-renewed {
    background-color: #0dcaf0 !important;
    color: #212529 !important;
}

/* 自用申请状态 */
.am-status-pending {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.am-status-approved {
    background-color: #198754 !important;
    color: #fff !important;
}

.am-status-rejected {
    background-color: #dc3545 !important;
    color: #fff !important;
}

/* 用户状态 */
.am-status-enabled {
    background-color: #198754 !important;
    color: #fff !important;
}

.am-status-disabled {
    background-color: #dc3545 !important;
    color: #fff !important;
}

/* ==================== 到期预警高亮 ==================== */

/* 紧急预警（≤7天） - 红色背景 */
.am-expire-urgent {
    background-color: #f8d7da !important;
    border-left: 4px solid #dc3545 !important;
}

/* 普通预警（8-30天） - 橙色背景 */
.am-expire-normal {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107 !important;
}

/* 已过期 - 深色背景 */
.am-expire-overdue {
    background-color: #d6d8db !important;
    border-left: 4px solid #6c757d !important;
}

/* ==================== 统计卡片 ==================== */
.am-stat-card {
    border-radius: 8px;
    transition: transform 0.2s;
}

.am-stat-card:hover {
    transform: translateY(-2px);
}

.am-stat-card .am-stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.am-stat-card .am-stat-label {
    font-size: 0.875rem;
    color: #6c757d;
}

/* ==================== 表单间距 ==================== */
.am-form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.am-form-section:last-child {
    border-bottom: none;
}

.am-form-section h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* 表单组间距 */
.am-form-group {
    margin-bottom: 1rem;
}

/* ==================== 表格样式 ==================== */
.am-table th {
    background-color: #e9ecef;
    font-weight: 600;
    white-space: nowrap;
}

.am-table td {
    vertical-align: middle;
}

/* 表格行 hover 效果 */
.am-table-hover tbody tr:hover {
    background-color: #f0f4ff;
}

/* ==================== 操作按钮组 ==================== */
.am-action-btns .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* ==================== 空数据提示 ==================== */
.am-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.am-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* ==================== 搜索栏 ==================== */
.am-search-bar {
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ==================== 详情页 ==================== */
.am-detail-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.am-detail-section dt {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
}

.am-detail-section dd {
    color: #212529;
    margin-bottom: 0.75rem;
}

/* ==================== 响应式调整 ==================== */
@media (max-width: 768px) {
    .am-stat-card .am-stat-number {
        font-size: 1.5rem;
    }

    .am-action-btns .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.25rem;
    }
}
