/* ============================================
   前台非首页公共样式 - page.css
   沿用消防救援红蓝配色，正式官方风格
   ============================================ */

/* ============ 简洁标题栏 ============ */
.page-header {
    background: linear-gradient(135deg, #003D7A 0%, #0052A3 100%);
    padding: 18px 0;
    border-bottom: 3px solid #FFD700;
}

.page-header-inner {
    display: flex;
    align-items: center;
}

.page-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
}

.page-logo-text h1 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.page-logo-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    letter-spacing: 1px;
}

/* ============ 子导航 ============ */
.sub-nav {
    background: #fff;
    border-bottom: 1px solid #E9ECEF;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.sub-nav-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.sub-nav-list li a {
    display: block;
    padding: 14px 22px;
    color: #495057;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
}

.sub-nav-list li a:hover {
    color: #E60012;
    background: rgba(230, 0, 18, 0.04);
}

.sub-nav-list li.active a {
    color: #E60012;
    border-bottom-color: #E60012;
}

/* ============ 通用容器 ============ */
.page-main {
    min-height: calc(100vh - 280px);
    padding: 32px 0;
    background: #F8F9FA;
}

.breadcrumb {
    font-size: 13px;
    color: #868E96;
    margin-bottom: 16px;
}
.breadcrumb a { color: #0052A3; }
.breadcrumb a:hover { color: #E60012; }
.breadcrumb .sep { margin: 0 6px; color: #CED4DA; }

/* ============ 卡片 ============ */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 32px;
    margin-bottom: 24px;
}

.card-title {
    font-size: 20px;
    color: #212529;
    padding-bottom: 14px;
    margin-bottom: 24px;
    border-bottom: 2px solid #F1F3F5;
    position: relative;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #E60012;
}

.card-title.no-border { border-bottom: none; padding-bottom: 0; }

/* ============ 表单 ============ */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full { grid-column: 1 / -1; }

.form-label {
    font-size: 14px;
    color: #343A40;
    font-weight: 500;
}
.form-label .required { color: #E60012; margin-left: 2px; }
.form-label .hint { color: #868E96; font-weight: normal; font-size: 12px; margin-left: 6px; }

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #DEE2E6;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #343A40;
    background: #fff;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #0052A3;
    box-shadow: 0 0 0 3px rgba(0, 82, 163, 0.12);
}

.form-control:disabled { background: #F1F3F5; color: #868E96; cursor: not-allowed; }

textarea.form-control { min-height: 88px; resize: vertical; }
select.form-control { cursor: pointer; }

.form-text {
    font-size: 12px;
    color: #868E96;
}

.form-error {
    font-size: 12px;
    color: #DC3545;
}

.form-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #F1F3F5;
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ============ 按钮 ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #E60012 0%, #B3000E 100%);
    color: #fff;
    box-shadow: 0 3px 10px rgba(230, 0, 18, 0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(230, 0, 18, 0.35); color:#fff; }

.btn-secondary {
    background: #fff;
    color: #003D7A;
    border-color: #DEE2E6;
}
.btn-secondary:hover { background: #F1F3F5; color:#003D7A; }

.btn-blue {
    background: linear-gradient(135deg, #0052A3 0%, #003D7A 100%);
    color: #fff;
}
.btn-blue:hover { transform: translateY(-1px); color:#fff; }

.btn-outline {
    background: #fff;
    color: #495057;
    border-color: #DEE2E6;
}
.btn-outline:hover { background: #F8F9FA; border-color: #ADB5BD; }

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

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 12px 32px; font-size: 16px; }
.btn-block { width: 100%; }

/* ============ 提示框 ============ */
.alert {
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 14px;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: #e6f9ec; color: #1f7a3d; border-color: #28A745; }
.alert-danger  { background: #fdecee; color: #a32232; border-color: #DC3545; }
.alert-warning { background: #fff8e1; color: #8a6d00; border-color: #FFC107; }
.alert-info    { background: #e8f4fb; color: #0b5779; border-color: #17A2B8; }

/* ============ 表格 ============ */
.table-wrap {
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead th {
    background: #F1F3F5;
    color: #343A40;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #DEE2E6;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #F1F3F5;
    color: #495057;
    vertical-align: middle;
}

.data-table tbody tr:hover td { background: #F8F9FA; }
.data-table tbody tr:last-child td { border-bottom: none; }

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: #868E96; }
.text-danger { color: #DC3545; }
.text-success{ color: #28A745; }
.text-warning{ color: #FFC107; }
.text-primary{ color: #0052A3; }
.fw-bold { font-weight: 700; }

/* ============ 状态标签 ============ */
.tag {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
}
.tag-warning { background: #fff8e1; color: #8a6d00; }
.tag-success { background: #e6f9ec; color: #1f7a3d; }
.tag-danger  { background: #fdecee; color: #a32232; }
.tag-muted   { background: #F1F3F5; color: #868E96; }
.tag-info    { background: #e8f4fb; color: #0b5779; }
.tag-blue    { background: rgba(0, 82, 163, 0.1); color: #0052A3; }
.tag-red     { background: rgba(230, 0, 18, 0.1); color: #E60012; }

/* ============ 分页 ============ */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 18px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 6px 12px;
    border: 1px solid #DEE2E6;
    color: #495057;
    font-size: 13px;
    border-radius: 4px;
    background: #fff;
}
.pagination a:hover { background: #F1F3F5; }
.pagination .current { background: #E60012; color: #fff; border-color: #E60012; }

/* ============ 认证页（注册/登录）专用 ============ */
.auth-wrap {
    min-height: calc(100vh - 200px);
    padding: 48px 0;
    background: linear-gradient(135deg, #f5f8fc 0%, #eef3f9 100%);
    display: flex;
    align-items: center;
}

.auth-card {
    background: #fff;
    max-width: 540px;
    margin: 0 auto;
    width: 100%;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0, 61, 122, 0.1);
    border-top: 4px solid #E60012;
}

.auth-card.wide { max-width: 760px; }

.auth-title {
    font-size: 22px;
    color: #003D7A;
    text-align: center;
    margin-bottom: 6px;
    font-weight: 700;
}

.auth-subtitle {
    text-align: center;
    color: #868E96;
    font-size: 13px;
    margin-bottom: 28px;
}

.auth-form .form-group { margin-bottom: 16px; }

.auth-form .form-actions {
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
    padding-top: 16px;
}

.auth-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 13px;
    color: #868E96;
}
.auth-footer a { color: #0052A3; font-weight: 500; }
.auth-footer a:hover { color: #E60012; }

/* ============ 文件上传 ============ */
.upload-box {
    border: 2px dashed #CED4DA;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    background: #F8F9FA;
    cursor: pointer;
    transition: all 0.2s;
}
.upload-box:hover { border-color: #0052A3; background: #f0f6fc; }
.upload-box.has-file { border-color: #28A745; background: #f3fcf5; border-style: solid; }

.upload-box input[type="file"] { display: none; }

.upload-icon {
    color: #868E96;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}

.upload-text {
    color: #495057;
    font-size: 14px;
    margin-bottom: 4px;
}

.upload-hint {
    color: #868E96;
    font-size: 12px;
}

.upload-filename {
    color: #1f7a3d;
    font-size: 13px;
    margin-top: 6px;
    word-break: break-all;
}

.upload-preview {
    margin-top: 10px;
    max-width: 120px;
    max-height: 150px;
    border-radius: 4px;
    border: 1px solid #DEE2E6;
}

/* ============ 个人中心 ============ */
.profile-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

.profile-side {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
    height: fit-content;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, #E60012, #B3000E);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    border: 3px solid #FFD700;
}

.profile-name {
    font-size: 18px;
    color: #212529;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-meta {
    color: #868E96;
    font-size: 13px;
    margin-bottom: 18px;
}

.profile-side-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #F1F3F5;
}
.info-row:last-child { border-bottom: none; }
.info-label {
    width: 130px;
    color: #868E96;
    font-size: 14px;
    flex-shrink: 0;
}
.info-value {
    color: #343A40;
    font-size: 14px;
    flex: 1;
}

/* ============ 步骤条 ============ */
.steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 28px;
    position: relative;
}
.steps::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: #DEE2E6;
    z-index: 0;
}
.step {
    text-align: center;
    position: relative;
    z-index: 1;
    flex: 1;
}
.step-num {
    width: 36px;
    height: 36px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #DEE2E6;
    color: #868E96;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.step.active .step-num {
    background: #E60012;
    border-color: #E60012;
    color: #fff;
}
.step.done .step-num {
    background: #28A745;
    border-color: #28A745;
    color: #fff;
}
.step-label {
    font-size: 13px;
    color: #868E96;
}
.step.active .step-label { color: #E60012; font-weight: 500; }
.step.done .step-label { color: #28A745; }

/* ============ 页脚 ============ */
.page-footer {
    background: #002A56;
    color: rgba(255, 255, 255, 0.75);
    padding: 24px 0;
    text-align: center;
    font-size: 12px;
}
.page-footer p { margin: 3px 0; }
.page-footer .copyright { color: rgba(255, 255, 255, 0.45); margin-top: 8px; }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
    .page-header-inner { flex-direction: column; gap: 10px; text-align: center; }
    .page-logo { flex-direction: column; }
    .page-logo-text h1 { font-size: 18px; }
    .card { padding: 20px; }
    .auth-card { padding: 24px; }
    .sub-nav-list li a { padding: 10px 14px; font-size: 13px; }
    .info-label { width: 100px; }
}
