/**
 * 全局UI样式规范
 * 符合国内航旅平台风格
 */

/* ========== 基础样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ========== 页面标题 ========== */
.page-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-bottom: 16px;
}

/* ========== 返回按钮 ========== */
.back-button {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.back-button img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

/* .header 样式已移至 style.css，此处移除避免冲突 */

/* ========== 卡片组件 ========== */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
    overflow: hidden;
}

.card-header {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.card-body {
    padding: 16px;
}

/* ========== 按钮组件 ========== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1.5;
    min-height: 44px;
    box-sizing: border-box;
}

.btn-primary {
    background: #1677ff;
    color: #fff;
    width: 100%;
}

.btn-primary:active {
    background: #0958d9;
    opacity: 0.9;
}

.btn-secondary {
    background: #fff;
    color: #1677ff;
    border: 1px solid #1677ff;
}

.btn-secondary:active {
    background: #f0f7ff;
}

.btn-disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========== 标签组件 ========== */
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.5;
}

.tag.success {
    background: #e6f7ff;
    color: #1677ff;
}

.tag.processing {
    background: #fff7e6;
    color: #fa8c16;
}

.tag.disabled {
    background: #f5f5f5;
    color: #999;
}

/* ========== 表单组件 ========== */
.form-item {
    margin-bottom: 20px;
}

.form-item label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

.form-item input,
.form-item select,
.form-item textarea {
    width: 100%;
    min-height: 44px;
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-item input:focus,
.form-item select:focus,
.form-item textarea:focus {
    outline: none;
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
}

.form-item textarea {
    min-height: 100px;
    resize: vertical;
}

/* ========== Tab组件 ========== */
.tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 16px;
}

.tab-item {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-item.active {
    color: #1677ff;
    border-bottom-color: #1677ff;
    font-weight: 500;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========== 空数据占位 ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 14px;
    color: #999;
}

/* ========== 底部固定说明 ========== */
.footer-tip {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #999;
    text-align: center;
    line-height: 1.6;
    z-index: 100;
}

.footer-tip-space {
    height: 80px;
}

/* ========== 图标样式 ========== */
.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
}

.icon-large {
    width: 24px;
    height: 24px;
}

/* ========== 工具类 ========== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-16 {
    margin-top: 16px;
}

.mb-16 {
    margin-bottom: 16px;
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-end {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* ========== 说明卡片 ========== */
.info-card {
    margin: 16px;
    padding: 14px;
    background: #f7f9fc;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
}

.info-card.warning {
    background: #fff7e6;
}

.info-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.info-list {
    padding-left: 16px;
}

.info-list li {
    margin-bottom: 6px;
    line-height: 1.6;
}

/* ========== 弹窗样式 ========== */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-dialog {
    width: 90%;
    max-width: 480px;
    background: #fff;
    border-radius: 16px;
    padding: 20px 20px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    font-size: 20px;
    color: #999;
    cursor: pointer;
}

.modal-body {
    margin-top: 8px;
}

.modal-options {
    margin-top: 16px;
}

.modal-option {
    width: 100%;
    padding: 12px 16px;
    border-radius: 24px;
    border: 1px solid #e0e0e0;
    background: #fff;
    font-size: 15px;
    color: #333;
    text-align: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.modal-option.primary {
    background: #0052a3;
    border-color: #0052a3;
    color: #fff;
}

