/* ========================================
   退休人员档案管理系统 - 样式表
   政府风格 - 简洁/清晰/稳重大方
   ======================================== */

/* ---------- 全局重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", Arial, sans-serif;
    background: #f5f6fa;
    color: #333333;
    font-size: 14px;
    line-height: 1.6;
}

a {
    color: #2b6cb0;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ---------- 登录页 ---------- */
.login-page {
    background: #1a3c6e;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: #ffffff;
    padding: 40px 35px;
    border: 1px solid #dce1e8;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #1a3c6e;
    padding-bottom: 20px;
}

.login-header h1 {
    font-size: 20px;
    color: #1a3c6e;
    font-weight: 600;
    letter-spacing: 2px;
}

.login-header p {
    font-size: 13px;
    color: #999;
    margin-top: 5px;
}

.login-error {
    background: #fde8e8;
    color: #c0392b;
    padding: 10px 15px;
    border-left: 3px solid #c0392b;
    margin-bottom: 20px;
    font-size: 13px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e8edf4;
    font-size: 12px;
    color: #999;
}

/* ---------- 头部 ---------- */
.site-header {
    background: #1a3c6e;
    color: #ffffff;
    height: 60px;
    line-height: 60px;
    border-bottom: 2px solid #2b6cb0;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.header-left {
    display: flex;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

.logo-icon {
    font-size: 22px;
}

.logo-text {
    color: #ffffff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.user-info {
    color: #c8d6e5;
}

.user-role {
    color: #8cb4e8;
    font-size: 12px;
    margin-left: 3px;
}

.btn-outline {
    background: transparent;
    border: 1px solid #5a8fc9;
    color: #ffffff;
    padding: 5px 15px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-outline:hover {
    background: #2b6cb0;
    text-decoration: none;
}

/* ---------- 导航 ---------- */
.site-nav {
    background: #ffffff;
    border-bottom: 2px solid #e8edf4;
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    padding: 12px 20px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-menu a:hover {
    color: #1a3c6e;
    background: #f5f6fa;
    text-decoration: none;
}

.nav-menu a.active {
    color: #1a3c6e;
    border-bottom-color: #1a3c6e;
    background: #f5f6fa;
}

/* ---------- 主体 ---------- */
.site-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 180px);
}

/* ---------- 页面标题 ---------- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8edf4;
}

.page-header h2 {
    font-size: 18px;
    color: #1a3c6e;
    font-weight: 600;
}

/* ---------- 统计卡片 ---------- */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #dce1e8;
    padding: 18px 20px;
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1a3c6e;
    line-height: 1.3;
}

.stat-label {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

.stat-card.stat-green .stat-number {
    color: #27ae60;
}
.stat-card.stat-orange .stat-number {
    color: #e67e22;
}
.stat-card.stat-blue .stat-number {
    color: #2b6cb0;
}

/* ---------- 搜索栏 ---------- */
.search-bar {
    background: #ffffff;
    border: 1px solid #dce1e8;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 15px;
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 15px;
    width: 100%;
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 0 0 auto;
}

.search-field label {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.search-field input,
.search-field select {
    padding: 6px 10px;
    border: 1px solid #dce1e8;
    font-size: 13px;
    background: #ffffff;
    min-width: 120px;
    height: 34px;
    font-family: inherit;
}

.search-field input:focus,
.search-field select:focus {
    border-color: #2b6cb0;
    outline: none;
}

.search-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding-bottom: 2px;
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #dce1e8;
    background: #ffffff;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
    line-height: 1.5;
}
.btn:hover {
    text-decoration: none;
    opacity: 0.85;
}

.btn-primary {
    background: #1a3c6e;
    border-color: #1a3c6e;
    color: #ffffff;
}
.btn-primary:hover {
    background: #2b6cb0;
    border-color: #2b6cb0;
    color: #ffffff;
}

.btn-success {
    background: #27ae60;
    border-color: #27ae60;
    color: #ffffff;
}
.btn-success:hover {
    background: #2ecc71;
    border-color: #2ecc71;
    color: #ffffff;
}

.btn-default {
    background: #ffffff;
    border-color: #dce1e8;
    color: #555;
}
.btn-default:hover {
    background: #f5f6fa;
}

.btn-danger {
    background: #c0392b;
    border-color: #c0392b;
    color: #ffffff;
}
.btn-danger:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #ffffff;
}

.btn-transfer {
    background: #e67e22;
    border-color: #e67e22;
    color: #ffffff;
}
.btn-transfer:hover {
    background: #f39c12;
    border-color: #f39c12;
    color: #ffffff;
}

.btn-view {
    background: #2b6cb0;
    border-color: #2b6cb0;
    color: #ffffff;
    padding: 2px 10px;
    font-size: 12px;
}
.btn-view:hover {
    background: #1a3c6e;
    border-color: #1a3c6e;
    color: #ffffff;
}

.btn-edit {
    background: #f39c12;
    border-color: #f39c12;
    color: #ffffff;
    padding: 2px 10px;
    font-size: 12px;
}
.btn-edit:hover {
    background: #e67e22;
    border-color: #e67e22;
    color: #ffffff;
}

.btn-sm {
    padding: 2px 10px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 16px;
}

/* ---------- 表格 ---------- */
.table-container {
    background: #ffffff;
    border: 1px solid #dce1e8;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    background: #f0f2f5;
}

.data-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #dce1e8;
    white-space: nowrap;
}

.data-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #e8edf4;
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #f8f9fb;
}

.data-table tbody tr:nth-child(even) {
    background: #fafbfc;
}
.data-table tbody tr:nth-child(even):hover {
    background: #f5f6fa;
}

/* 分组标题行 */
.data-table tr.group-header td {
    background: #e8edf4;
    font-weight: 600;
    color: #1a3c6e;
    padding: 6px 12px;
    border-bottom: 1px solid #dce1e8;
}
.data-table tr.group-subheader td {
    background: #f0f4f9;
    color: #555;
    padding: 4px 12px 4px 30px;
    border-bottom: 1px solid #e8edf4;
    font-size: 12px;
}
.data-table tr.group-subheader2 td {
    background: #f5f8fc;
    color: #666;
    padding: 3px 12px 3px 55px;
    border-bottom: 1px solid #e8edf4;
    font-size: 12px;
}

/* ---------- 状态标签 ---------- */
.status-tag {
    display: inline-block;
    padding: 2px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
}

.status-done {
    background: #27ae60;
}
.status-pending {
    background: #e67e22;
}

/* ---------- 表单 ---------- */
.form-section {
    background: #ffffff;
    border: 1px solid #dce1e8;
    padding: 20px 25px;
    margin-bottom: 20px;
}

.form-section h3 {
    font-size: 15px;
    color: #1a3c6e;
    border-bottom: 1px solid #e8edf4;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-weight: 600;
}

.form-horizontal .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.form-group .required {
    color: #c0392b;
    font-weight: 700;
}

.form-control {
    padding: 7px 10px;
    border: 1px solid #dce1e8;
    font-size: 13px;
    background: #ffffff;
    font-family: inherit;
    width: 100%;
}

.form-control:focus {
    border-color: #2b6cb0;
    outline: none;
}

.form-control-file {
    padding: 6px 0;
    font-size: 13px;
}

.help-text {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.form-actions {
    display: flex;
    gap: 10px;
    padding: 15px 0 5px;
    border-top: 1px solid #e8edf4;
    margin-top: 10px;
}

/* ---------- 详情页 ---------- */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.detail-card {
    background: #ffffff;
    border: 1px solid #dce1e8;
    padding: 18px 20px;
}

.detail-card-full {
    grid-column: 1 / -1;
}

.detail-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a3c6e;
    border-bottom: 1px solid #e8edf4;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.detail-row {
    display: flex;
    padding: 5px 0;
    border-bottom: 1px solid #f5f6fa;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    width: 100px;
    flex-shrink: 0;
    color: #888;
    font-size: 13px;
}

.detail-value {
    flex: 1;
    color: #333;
    font-size: 13px;
    word-break: break-all;
}

/* 详情页分区 */
.detail-section {
    background: #ffffff;
    border: 1px solid #dce1e8;
    padding: 18px 20px;
    margin-bottom: 20px;
}

.detail-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a3c6e;
    border-bottom: 1px solid #e8edf4;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* 处理记录 */
.followup-list {
    margin-bottom: 15px;
}

.followup-item {
    padding: 10px 15px;
    border-left: 3px solid #2b6cb0;
    background: #f8f9fb;
    margin-bottom: 8px;
}

.followup-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.followup-time {
    margin-right: 10px;
}

.followup-operator {
    color: #666;
}

.followup-content {
    color: #333;
    font-size: 14px;
}

.followup-add {
    margin-top: 10px;
}

/* ---------- 分页 ---------- */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #f8f9fb;
    border-top: 1px solid #dce1e8;
    font-size: 13px;
    color: #666;
}

.pagination-links {
    display: flex;
    gap: 10px;
}

.pagination-links a {
    padding: 4px 14px;
    border: 1px solid #dce1e8;
    background: #ffffff;
    color: #333;
    font-size: 13px;
}
.pagination-links a:hover {
    background: #e8edf4;
    text-decoration: none;
}

/* ---------- 提示 ---------- */
.alert {
    padding: 12px 18px;
    margin-bottom: 15px;
    border-left: 4px solid;
    font-size: 14px;
}

.alert-success {
    background: #eafaf1;
    border-color: #27ae60;
    color: #1a7a42;
}

.alert-error {
    background: #fde8e8;
    border-color: #c0392b;
    color: #922b21;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 15px;
}

/* ---------- 底部 ---------- */
.site-footer {
    background: #2c3e50;
    color: #95a5a6;
    padding: 15px 20px;
    text-align: center;
    font-size: 12px;
    border-top: 2px solid #1a3c6e;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
}

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 15px;
        gap: 5px;
    }
    .site-header {
        height: auto;
        line-height: 1.5;
    }
    .header-right {
        flex-wrap: wrap;
    }
    .nav-menu {
        flex-wrap: wrap;
    }
    .nav-menu a {
        padding: 8px 14px;
        font-size: 13px;
    }
    .stats-cards {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .stat-number {
        font-size: 22px;
    }
    .search-row {
        flex-direction: column;
        align-items: stretch;
    }
    .search-field {
        flex: 1;
    }
    .search-field input,
    .search-field select {
        width: 100%;
        min-width: unset;
    }
    .search-actions {
        justify-content: flex-start;
    }
    .form-horizontal .form-row {
        grid-template-columns: 1fr;
    }
    .data-table {
        font-size: 12px;
    }
    .data-table th,
    .data-table td {
        padding: 6px 8px;
    }
    .btn {
        font-size: 12px;
        padding: 4px 12px;
    }
    .detail-row {
        flex-wrap: wrap;
    }
    .detail-label {
        width: 80px;
    }
    .site-main {
        padding: 10px;
    }
    .page-header {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .stats-cards {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .stat-card {
        padding: 12px 10px;
    }
    .stat-number {
        font-size: 18px;
    }
    .login-box {
        padding: 25px 20px;
    }
}