/* ============================================================
   南京蓝天救援队 - 身份查验系统 样式表
   主题色: 蓝天蓝 #1a56a8 / #2b7cd4
   ============================================================ */

:root {
    --primary-dark:   #1a3a6e;  /* 导航栏深蓝 */
    --primary:        #1a56a8;  /* 主蓝色 */
    --primary-light:  #2b7cd4;  /* 浅蓝 */
    --primary-lighter:#5ba3f0;
    --gradient-start: #1a56a8;
    --gradient-end:   #3d8bd8;
    --bg-body:        #f0f2f5;
    --bg-white:       #ffffff;
    --text-primary:   #1a1a2e;
    --text-secondary: #666680;
    --text-muted:     #9999aa;
    --border-color:   #e0e4ea;
    --success:        #28a745;
    --danger:         #dc3545;
    --warning:        #ffc107;
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:      0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg:      0 8px 24px rgba(0,0,0,0.12);
    --radius-sm:      6px;
    --radius-md:      10px;
    --radius-lg:      16px;
    --radius-xl:      25px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ---- 导航栏 ---- */
.navbar {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}
.navbar-brand .shield-icon {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.navbar-nav {
    display: flex;
    gap: 4px;
}
.nav-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: var(--radius-xl);
    font-size: 15px;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.nav-link.active {
    background: rgba(255,255,255,0.25);
    font-weight: 600;
}
.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.navbar-right a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.navbar-right a:hover { color: #fff; }

/* ---- Hero搜索区域 ---- */
.hero-section {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 70px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(255,255,255,0.05) 0%, transparent 40%);
    pointer-events: none;
}
.hero-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 22px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.hero-icon svg {
    width: 44px;
    height: 44px;
    fill: rgba(255,255,255,0.95);
}
.hero-title {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 4px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}
.hero-subtitle {
    font-size: 20px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.hero-hint {
    font-size: 15px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 34px;
    position: relative;
    z-index: 1;
}

/* ---- 搜索框 ---- */
.search-container {
    max-width: 650px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.search-box {
    display: flex;
    background: #fff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: box-shadow 0.3s;
}
.search-box:focus-within {
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.search-input {
    flex: 1;
    padding: 16px 26px;
    border: none;
    outline: none;
    font-size: 17px;
    color: var(--text-primary);
    background: transparent;
}
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
    width: 64px;
    background: var(--primary-dark);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s;
    flex-shrink: 0;
}
.search-btn:hover { background: #142d5c; }
.search-btn svg {
    width: 26px;
    height: 26px;
    fill: #fff;
}

/* 快捷标签 */
.quick-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.tag-btn {
    padding: 8px 22px;
    border: 1.5px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: var(--radius-xl);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.25s;
    backdrop-filter: blur(4px);
}
.tag-btn:hover, .tag-btn.active-tag {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-1px);
}

/* ---- 结果区域 ---- */
.results-section {
    max-width: 900px;
    margin: -30px auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}
.result-header {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 18px;
    padding-left: 4px;
}
.result-count {
    font-weight: 700;
    color: var(--primary);
}

/* 队员卡片 */
.member-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 20px;
    border-top: 4px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
}
.member-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.member-card.dismissed {
    border-top-color: var(--danger);
    background: #fff5f5;
}
.member-card.resigned {
    border-top-color: #fd7e14;
    background: #fffbf5;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 28px;
}
.card-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-lighter));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.card-avatar svg {
    width: 50px;
    height: 50px;
    fill: rgba(255,255,255,0.95);
}
.card-avatar.vehicle-avatar {
    background: linear-gradient(135deg, #28a745, #5cb85c);
}
.card-name-group {
    flex: 1;
}
.card-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}
.card-nickname {
    font-size: 15px;
    color: var(--text-secondary);
    margin-left: 8px;
}
.card-status {
    font-size: 14px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: var(--radius-xl);
    white-space: nowrap;
}
.status-active {
    color: var(--primary);
    background: #e8f0fe;
}
.status-dismissed {
    color: var(--danger);
    background: #fde8e8;
}
.status-resigned {
    color: #fd7e14;
    background: #fff0e0;
}
.status-in-use {
    color: var(--primary);
    background: #e8f4fd;
}
.status-maintenance {
    color: #fd7e14;
    background: #fff4e5;
}
.status-retired {
    color: var(--text-muted);
    background: #f0f0f0;
}

/* 卡片详情 */
.card-details {
    padding: 0 28px 24px;
}
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 30px;
    margin-bottom: 20px;
}
.detail-item {
    background: #f8fafc;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
}
.detail-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.detail-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}
.gender-male { color: var(--primary); }
.gender-female { color: #e83e8c; }

/* 荣誉勋章 */
.honors-section {
    margin-bottom: 18px;
}
.honors-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.honors-title .trophy { color: #f0ad4e; }
.honor-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.honor-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    background: linear-gradient(135deg, #fffef5, #fff9e6);
    border: 1px solid #f0e6c0;
    border-radius: var(--radius-xl);
    font-size: 14px;
    color: #8a6d00;
    font-weight: 500;
}

/* 简介/备注 */
.bio-text {
    background: #f0f7ff;
    border-left: 4px solid var(--primary);
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}
.bio-text.dismissal-reason {
    background: #fef0f0;
    border-left-color: var(--danger);
}

/* 无结果 */
.no-result {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}
.no-result-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 20px 40px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ---- 响应式 ---- */
@media (max-width: 640px) {
    .navbar { padding: 0 14px; height: 54px; }
    .navbar-nav { gap: 2px; }
    .nav-link { padding: 6px 12px; font-size: 13px; }
    .nav-link span.label-text { display: none; }
    .hero-section { padding: 45px 16px 55px; }
    .hero-title { font-size: 27px; letter-spacing: 2px; }
    .hero-subtitle { font-size: 17px; }
    .hero-hint { font-size: 13px; }
    .search-input { padding: 13px 18px; font-size: 15px; }
    .search-btn { width: 52px; }
    .detail-grid { grid-template-columns: 1fr; gap: 10px; }
    .card-header { padding: 18px 18px; }
    .card-details { padding: 0 18px 18px; }
    .card-name { font-size: 19px; }
    .honor-tags { gap: 6px; }
    .honor-tag { padding: 5px 12px; font-size: 13px; }
    .results-section { margin-top: -20px; }
}

/* ---- 加载动画 ---- */
.loading-spinner {
    text-align: center;
    padding: 40px;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e4ea;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 管理后台通用 ---- */
.admin-wrapper {
    min-height: 100vh;
    background: var(--bg-body);
}
.admin-sidebar {
    width: 240px;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    color: #fff;
    padding: 24px 0;
    z-index: 50;
    overflow-y: auto;
}
.sidebar-logo {
    padding: 0 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    margin-bottom: 20px;
    font-size: 17px;
    font-weight: 700;
}
.sidebar-menu { list-style: none; padding: 0 10px; }
.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
    margin-bottom: 2px;
}
.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
.admin-main {
    margin-left: 240px;
    padding: 24px 30px;
    min-height: 100vh;
}
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.admin-topbar h1 {
    font-size: 22px;
    font-weight: 700;
}

/* 表格样式 */
.data-table {
    width: 100%;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border-collapse: collapse;
}
.data-table th {
    background: #f5f7fa;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}
.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafbfd; }

/* 按钮组 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 18px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #218838; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover  { background: #c82333; }
.btn-warning { background: var(--warning); color: #333; }
.btn-sm { padding: 5px 12px; font-size: 13px; }

/* 表单 */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: var(--bg-white);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,86,168,0.1); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 28px;
    max-width: 750px;
}
.form-card h2 {
    font-size: 19px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-color);
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.login-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 42px 38px;
    width: 400px;
    max-width: 92vw;
}
.login-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-dark);
    font-size: 22px;
}

/* 统计卡 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
}
.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}
.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s;
}
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* 操作按钮行 */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 520px;
    max-width: 92vw;
    max-height: 85vh;
    overflow-y: auto;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.modal-header h3 { font-size: 18px; }
.modal-close {
    background: none; border: none; font-size: 24px;
    cursor: pointer; color: var(--text-muted);
    line-height: 1;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px; right: 20px;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    z-index: 2000;
    animation: slideInRight 0.3s ease;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warning { background: var(--warning); color: #333; }
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   响应式设计 - 移动端适配
   ============================================================ */

/* 平板设备 */
@media (max-width: 768px) {
    .card-avatar {
        width: 80px;
        height: 80px;
    }
    .card-avatar img {
        width: 100%;
        height: 100%;
    }
    .card-avatar svg {
        width: 38px;
        height: 38px;
    }
    .card-name {
        font-size: 18px;
    }
    .card-header {
        gap: 12px;
        padding: 18px 20px;
    }
    .hero-title {
        font-size: 28px;
    }
    .detail-grid {
        grid-template-columns: 1fr !important;
    }
}

/* 手机设备 */
@media (max-width: 480px) {
    .card-avatar {
        width: 65px;
        height: 65px;
    }
    .card-avatar img {
        width: 100%;
        height: 100%;
    }
    .card-avatar svg {
        width: 30px;
        height: 30px;
    }
    .card-name {
        font-size: 16px;
    }
    .card-nickname {
        font-size: 13px;
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }
    .card-header {
        gap: 10px;
        padding: 15px 16px;
    }
    .card-status {
        font-size: 12px;
        padding: 4px 10px;
    }
    .hero-section {
        padding: 40px 16px 50px;
    }
    .hero-title {
        font-size: 24px;
        letter-spacing: 2px;
    }
    .hero-icon {
        width: 70px;
        height: 70px;
    }
    .hero-icon svg {
        width: 35px;
        height: 35px;
    }
    .search-box {
        max-width: 100%;
    }
    .member-card {
        margin: 0 8px;
    }
    .honor-tags {
        gap: 6px;
    }
    .honor-tag {
        font-size: 12px;
        padding: 4px 10px;
    }
}
