/* ================================================================
   报单王 - 公共样式
   ================================================================ */

/* ===== 基础重置 ===== */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #0b1a2f;
    background: #f5f7fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; border: 0; }
input, select, textarea, button { font-family: inherit; font-size: inherit; outline: none; }

/* ===== 应用容器（手机端最大宽度） ===== */
.app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: #f5f7fa;
    position: relative;
    padding-bottom: 70px;
}

/* ===== 通用按钮 ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    user-select: none;
    background: #1a3a6b;
    color: #fff;
}
.btn:active { transform: scale(0.97); opacity: 0.9; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: #1a3a6b; color: #fff; }
.btn-success { background: #10b981; color: #fff; }
.btn-danger  { background: #ef4444; color: #fff; }
.btn-outline {
    background: transparent;
    color: #1a3a6b;
    border: 1.5px solid #d0d6e0;
}
.btn-outline:active { border-color: #1a3a6b; }

.btn-block { display: block; width: 100%; }

/* ===== 输入框 ===== */
.form-input,
input[type="text"],
input[type="password"],
input[type="tel"],
input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #dce0e8;
    border-radius: 10px;
    background: #f8f9fc;
    transition: 0.2s;
}
input:focus { border-color: #1a3a6b; background: #fff; }

/* ===== 卡片 ===== */
.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(26, 58, 107, 0.06);
    padding: 16px;
    margin-bottom: 16px;
}

/* ===== 顶部导航栏 ===== */
.top-nav {
    background: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    border-bottom: 1px solid #eef1f6;
    min-height: 54px;
}
.top-nav .back {
    font-size: 26px;
    line-height: 1;
    color: #1a3a6b;
    cursor: pointer;
    padding: 0 8px 0 0;
    display: none;
}
.top-nav .back.show { display: inline-block; }
.top-nav .title {
    font-size: 17px;
    font-weight: 600;
    color: #0b1a2f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55%;
    display: inline-block;
    vertical-align: middle;
}
.top-nav .user-greeting {
    font-size: 13px;
    color: #5e6f8d;
    text-align: right;
}
.top-nav .user-greeting span { font-weight: 600; }
.top-nav .login-tip {
    font-size: 13px;
    color: #e67e22;
    background: #fff3e0;
    padding: 3px 15px;
    border-radius: 12px;
    text-align: center;
    color: #e67e22;
    border: 1px solid #ffe0b2;
}
.top-nav .login-tip a { color: #1a3a6b; font-weight: 600; }

/* ===== 底部导航栏 ===== */
.bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border-top: 1px solid #eef1f6;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav .nav-item {
    flex: 1;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #8a99b3;
    font-size: 12px;
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.2s;
}
.bottom-nav .nav-item.active { color: #1a3a6b; font-weight: 600; }
.bottom-nav .nav-icon {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.bottom-nav .nav-item-special {
    flex: 1;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #1a3a6b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    position: relative;
    margin-top: -22px;
}
.bottom-nav .special-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a3a6b, #2d5fa0);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(26, 58, 107, 0.3);
    margin-bottom: 2px;
}
.bottom-nav .special-wrap .icon-special {
    width: 26px;
    height: 26px;
    stroke: #fff;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ===== 页面 ===== */
.page {
    display: none;
    min-height: calc(100vh - 70px);
}
.page.active { display: block; }

/* ===== Toast ===== */
.toast {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(11, 26, 47, 0.88);
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 9999;
    max-width: 80%;
    text-align: center;
    line-height: 1.5;
    pointer-events: none;
    animation: toastIn 0.2s ease;
}
@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ===== 头像 ===== */
.avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a3a6b;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

/* ===== 加载占位 ===== */
.loading-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #8a99b3;
    font-size: 14px;
}

/* ===== 分割线 ===== */
.divider {
    height: 1px;
    background: #eef1f6;
    margin: 12px 0;
}

/* ===== 通用滚动条（移动端隐藏） ===== */
::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
}

/* ===== 防止文本选中（可点击元素） ===== */
.no-select {
    user-select: none;
    -webkit-user-select: none;
}

/* ===== 响应式：小于 480px 时全宽 ===== */
@media (max-width: 480px) {
    .app { max-width: 100%; }
    .bottom-nav { max-width: 100%; }
}