/* 建优选资质服务 - 样式表 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #1E6FD9;
    --primary-light: #EBF3FD;
    --accent: #FF6B35;
    --bg: #F5F7FA;
    --white: #FFFFFF;
    --text: #333333;
    --text-light: #666666;
    --border: #E8ECF0;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 8px;
    --radius-lg: 16px;
}

body {
    font-family: "PingFang SC", "Helvetica Neue", -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    max-width: 750px;
    margin: 0 auto;
    padding-bottom: 80px;
    min-height: 100vh;
}

/* ===== 顶部导航 ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--primary);
    color: var(--white);
    padding: 0 16px;
    height: 50px;
    display: flex;
    align-items: center;
}

.header-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 18px;
    font-weight: 600;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 20px;
}

/* ===== Banner轮播 ===== */
.banner {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #1E6FD9 0%, #3B8FE5 50%, #5DA3F0 100%);
}

.banner-slider {
    position: relative;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-slide:nth-child(2) {
    background: linear-gradient(135deg, #0D47A1 0%, #1565C0 100%);
}

.banner-slide:nth-child(3) {
    background: linear-gradient(135deg, #1A237E 0%, #283593 100%);
}

.banner-slide.active {
    opacity: 1;
}

.banner-content {
    text-align: center;
    color: var(--white);
    padding: 20px;
}

.banner-content h2 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 600;
}

.banner-content p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.banner-content-highlight {
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 24px 32px;
    backdrop-filter: blur(10px);
}

.banner-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.banner-btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 10px 28px;
    border-radius: 24px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.banner-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    width: 20px;
    border-radius: 4px;
    background: white;
}

/* ===== 快捷服务 ===== */
.quick-services {
    padding: 20px 16px;
    background: var(--white);
    margin-top: 0;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
    padding-left: 8px;
    border-left: 4px solid var(--primary);
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.quick-item {
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-item:active {
    transform: scale(0.96);
    background: var(--primary);
    color: white;
}

.quick-item:active .quick-icon {
    transform: scale(1.1);
}

.quick-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.quick-item span {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

/* ===== 服务分类 ===== */
.service-category {
    padding: 20px 16px;
    background: var(--white);
    margin-top: 10px;
}

.more-btn {
    text-align: center;
    color: var(--primary);
    font-size: 14px;
    padding: 12px;
    cursor: pointer;
    font-weight: 500;
}

.service-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.service-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.service-card:active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.service-card-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.service-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.service-card-desc {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
}

/* ===== 联系栏 ===== */
.contact-bar {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    max-width: 750px;
    margin: 0 auto;
    padding: 0 16px;
    z-index: 99;
}

.contact-content {
    background: var(--white);
    border-radius: 30px;
    box-shadow: var(--shadow);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-icon {
    font-size: 24px;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 11px;
    color: var(--text-light);
}

.contact-value {
    font-size: 15px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.contact-btn {
    background: var(--accent);
    color: white;
    padding: 10px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

/* ===== 底部导航 ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 750px;
    margin: 0 auto;
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-light);
    text-decoration: none;
    padding: 4px 16px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 22px;
}

.nav-item span:last-child {
    font-size: 11px;
}

/* ===== 产品列表页 ===== */
.products-header {
    background: var(--primary);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-btn {
    color: white;
    font-size: 20px;
    text-decoration: none;
}

.products-header h2 {
    font-size: 18px;
}

.tabs {
    display: flex;
    background: var(--white);
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.tab {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-light);
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.products-container {
    padding: 16px;
}

.category-section {
    margin-bottom: 24px;
}

.category-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 3px solid var(--primary);
}

/* ===== 产品详情页 ===== */
.detail-header {
    background: var(--primary);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.detail-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
}

.detail-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.detail-content {
    padding: 20px 16px;
}

.detail-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.detail-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--primary);
}

.detail-section p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text);
}

.detail-footer {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    max-width: 750px;
    margin: 0 auto;
    background: var(--white);
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 99;
}

.detail-footer .contact-btn {
    flex: 1;
    text-align: center;
}

/* ===== 咨询表单页 ===== */
.consult-header {
    background: linear-gradient(135deg, var(--primary), #3B8FE5);
    color: white;
    padding: 32px 16px;
    text-align: center;
}

.consult-header h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.consult-header p {
    font-size: 14px;
    opacity: 0.9;
}

.form-container {
    padding: 20px 16px;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.form-label .required {
    color: #FF4757;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    background: var(--white);
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    background: var(--white);
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-tip {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}

.submit-btn:active {
    opacity: 0.9;
    transform: scale(0.98);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 提交成功弹窗 */
.success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.success-modal.show {
    display: flex;
}

.success-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    max-width: 300px;
    margin: 0 20px;
}

.success-icon {
    font-size: 60px;
    margin-bottom: 16px;
}

.success-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text);
}

.success-content p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.success-btn {
    background: var(--primary);
    color: white;
    padding: 12px 32px;
    border-radius: 24px;
    border: none;
    font-size: 15px;
    cursor: pointer;
}

/* ===== 后台管理页 ===== */
.admin-header {
    background: linear-gradient(135deg, var(--primary), #3B8FE5);
    color: white;
    padding: 24px 16px;
    text-align: center;
}

.admin-header h2 {
    font-size: 20px;
    margin-bottom: 4px;
}

.admin-header p {
    font-size: 13px;
    opacity: 0.8;
}

.admin-stats {
    display: flex;
    padding: 16px;
    gap: 12px;
    background: var(--white);
}

.stat-card {
    flex: 1;
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.admin-section {
    padding: 16px;
}

.admin-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-actions {
    display: flex;
    gap: 8px;
}

.admin-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--white);
    font-size: 12px;
    cursor: pointer;
    color: var(--text);
}

.admin-btn.danger {
    color: #FF4757;
    border-color: #FF4757;
}

.record-list {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
}

.record-item {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.record-item:last-child {
    border-bottom: none;
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.record-company {
    font-weight: 600;
    font-size: 15px;
}

.record-time {
    font-size: 12px;
    color: var(--text-light);
}

.record-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.record-row {
    display: flex;
    font-size: 13px;
    color: var(--text);
}

.record-row span:first-child {
    color: var(--text-light);
    width: 70px;
    flex-shrink: 0;
}

.record-content {
    margin-top: 8px;
    padding: 10px;
    background: var(--bg);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
}

.empty-state {
    text-align: center;
    padding: 48px 16px;
    color: var(--text-light);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
}

/* ===== 登录页 ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--primary), #3B8FE5);
}

.login-header {
    padding: 60px 16px 40px;
    text-align: center;
    color: white;
}

.login-logo {
    font-size: 60px;
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    opacity: 0.8;
}

.login-form {
    flex: 1;
    background: var(--white);
    border-radius: 24px 24px 0 0;
    padding: 32px 24px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
}

.login-error {
    color: #FF4757;
    font-size: 13px;
    text-align: center;
    margin-top: 12px;
    display: none;
}

/* ===== 动画 ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* ===== 资质图片展示区 ===== */
.gallery-section {
    padding: 20px 16px;
    background: var(--white);
    margin-top: 10px;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.gallery-card {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--border);
}
.gallery-card:active {
    transform: scale(0.98);
}
.gallery-card-img {
    height: 100px;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-no-img {
    font-size: 36px;
    color: var(--text-light);
}
.gallery-card-title {
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
}
.empty-gallery {
    text-align: center;
    color: var(--text-light);
    padding: 40px 0;
    font-size: 14px;
}

/* ===== 政策信息板块 ===== */
.policy-section {
    padding: 20px 16px;
    background: var(--white);
    margin-top: 10px;
}
.policy-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.policy-card {
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid var(--primary);
}
.policy-card:active {
    background: var(--primary);
    color: white;
}
.policy-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}
.policy-summary {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 6px;
}
.policy-date {
    font-size: 11px;
    color: var(--text-light);
}
.empty-policy {
    text-align: center;
    color: var(--text-light);
    padding: 40px 0;
    font-size: 14px;
}

/* ===== 一键登录弹窗 ===== */
.login-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.login-modal.show { display: flex; }
.login-modal-content {
    background: var(--white);
    border-radius: 16px;
    width: 90%;
    max-width: 340px;
    overflow: hidden;
}
.login-modal-header {
    background: var(--primary);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.login-modal-header h3 { font-size: 16px; margin: 0; }
.login-modal-body { padding: 20px; }
.login-tip { font-size: 13px; color: var(--text-light); margin-bottom: 16px; text-align: center; }
.modal-close { font-size: 20px; color: white; cursor: pointer; }

/* ===== 一键登录框 ===== */
.oneclick-info {
    text-align: center;
    padding: 20px 10px 24px;
    background: linear-gradient(135deg, #e8f1ff 0%, #f5f9ff 100%);
    border-radius: 12px;
    margin-bottom: 18px;
}
.oneclick-icon { font-size: 40px; margin-bottom: 8px; }
.oneclick-label { font-size: 12px; color: var(--text-light); margin: 0 0 4px; }
.oneclick-phone { font-size: 22px; font-weight: 700; color: var(--primary); margin: 0 0 6px; letter-spacing: 1px; }
.oneclick-desc { font-size: 12px; color: var(--text-light); margin: 0; }
.login-link {
    text-align: center;
    color: var(--primary);
    font-size: 13px;
    margin-top: 14px;
    padding: 8px;
    cursor: pointer;
}
.login-link:hover { text-decoration: underline; }

/* ===== 资质图片详情弹窗 ===== */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.gallery-modal.show { display: flex; }
.gallery-modal-content {
    background: var(--white);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    max-height: 85vh;
    overflow: hidden;
}
.gallery-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.gallery-modal-header h3 { font-size: 16px; margin: 0; }
.gallery-modal-body { padding: 16px; overflow-y: auto; max-height: calc(85vh - 60px); }
.gallery-detail-img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 12px;
}
.gallery-detail-desc {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text);
}

/* ===== 我的页面 ===== */
.my-header {
    background: linear-gradient(135deg, var(--primary), #3B8FE5);
    color: white;
    padding: 32px 16px;
    text-align: center;
}
.my-header h2 { font-size: 20px; margin-bottom: 8px; }
.my-user-empty { padding: 24px 0; }
.my-user-empty p { font-size: 14px; color: var(--text-light); margin-bottom: 16px; }
.my-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.my-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.my-info { flex: 1; }
.my-name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.my-phone { font-size: 13px; color: var(--primary); margin-bottom: 2px; }
.my-login-time { font-size: 11px; color: var(--text-light); }
.my-section { padding: 16px; background: var(--white); margin-top: 10px; }
.my-section-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.my-consult-item {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 8px;
}
.my-consult-service { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.my-consult-time { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.my-consult-status { font-size: 12px; color: var(--success); }

/* ===== 详情图片 ===== */
.detail-image { margin-bottom: 12px; }
.detail-image img { width: 100%; border-radius: var(--radius); }

/* ===== 政策详情页 ===== */
.policy-header {
    background: var(--primary);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-direction: column;
    align-items: flex-start;
}
.policy-header h2 { font-size: 18px; margin: 0; }
.policy-header-date { font-size: 12px; opacity: 0.8; margin-top: 4px; }
.policy-detail-content { padding: 20px 16px; }
.policy-summary-box {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}
.policy-full-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text);
}

/* ===== 响应式 ===== */
@media (max-width: 375px) {
    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .service-list {
        grid-template-columns: 1fr;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
