/* ================================================================
   报单王 - 登录/注册页样式
   ================================================================ */

/* ===== 页面背景 ===== */
.login-body {
    background: linear-gradient(135deg, #1a3a6b 0%, #2d5fa0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
}

/* ===== 登录框主体 ===== */
.login-box {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    padding: 32px 28px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

/* ===== Logo 和副标题 ===== */
.login-box .logo {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #1a3a6b;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.login-box .logo span {
    color: #2d5fa0;
}
.login-box .sub {
    text-align: center;
    font-size: 14px;
    color: #8a99b3;
    margin-bottom: 20px;
}

/* ===== Tab 切换（登录 / 注册） ===== */
.login-box .tab-bar {
    display: flex;
    border-bottom: 2px solid #e8ecf2;
    margin-bottom: 20px;
    margin-top: 10px;
}
.login-box .tab-bar span {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 600;
    color: #8a99b3;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    user-select: none;
}
.login-box .tab-bar span.active {
    color: #1a3a6b;
    border-bottom-color: #1a3a6b;
}

/* ===== Tab 面板 ===== */
.login-box .tab-panel { display: none; }
.login-box .tab-panel.active { display: block; }

/* ===== 表单组（标签 + 输入框 同行） ===== */
.login-box .form-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.login-box .form-group label {
    min-width: 60px;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}
.login-box .form-group input,
.login-box .form-group .searchable-select {
    flex: 1;
    padding: 12px 14px;
    border: 1.5px solid #dce0e8;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    background: #f8f9fc;
    color: #0b1a2f;
    transition: 0.2s;
    box-sizing: border-box;
}
.login-box .form-group input:focus {
    border-color: #1a3a6b;
    background: #fff;
}
.login-box .form-group input::placeholder {
    color: #b0bcca;
}
.login-box .form-group .hint {
    font-size: 12px;
    color: #b0bcca;
    margin-top: 4px;
}
.login-box .form-group .hint span {
    color: #1a3a6b;
    font-weight: 500;
}

/* ===== 按钮 ===== */
.login-box .btn {
    display: block;
    width: 100%;
    padding: 14px 0;
    border: none;
    border-radius: 30px;
    background: #1a3a6b;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    margin-top: 4px;
    box-sizing: border-box;
}
.login-box .btn:active { transform: scale(0.97); background: #15305a; }
.login-box .btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== 注册按钮（绿色） ===== */
.login-box .btn-register {
    background: #10b981;
    color: #fff;
    border: none;
}
.login-box .btn-register:hover { background: #059669; }
.login-box .btn-register:active { background: #047857; }
.login-box .btn-register:disabled { opacity: 0.6; cursor: not-allowed; }

.login-box .btn,
.login-box .btn-register {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 底部提示 ===== */
.login-box .register-tip {
    text-align: center;
    font-size: 13px;
    color: #8a99b3;
    margin-top: 16px;
}
.login-box .register-tip a {
    color: #1a3a6b;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.login-box .register-tip a:hover { text-decoration: underline; }
.login-box .sub a {
    color: #1a3a6b;
    text-decoration: none;
}
.login-box .sub a:hover { text-decoration: underline; }

/* ===== 成功 / 错误提示 ===== */
.login-box .success-msg {
    background: #d1fae5;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
    margin-bottom: 16px;
    line-height: 1.5;
}
.login-box .success-msg.show { display: block; }

.login-box .error {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
    line-height: 1.5;
}
.login-box .error.show { display: block; }

/* ================================================================
   ===== 可搜索下拉框 =====
   ================================================================ */
.searchable-select {
    position: relative;
}

/* 已选展示区 */
.searchable-select .selected-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #dce0e8;
    border-radius: 12px;
    font-size: 15px;
    background: #f8f9fc;
    color: #0b1a2f;
    cursor: pointer;
    transition: 0.2s;
    box-sizing: border-box;
    user-select: none;
}
.searchable-select .selected-display:hover {
    border-color: #b0bcca;
}
.searchable-select .selected-display .arrow {
    color: #8a99b3;
    transition: transform 0.2s;
    font-size: 12px;
}
.searchable-select .selected-display .arrow.open {
    transform: rotate(180deg);
}
.searchable-select .selected-display .placeholder {
    color: #8a99b3;
}
.searchable-select .selected-display .selected-text {
    color: #0b1a2f;
}

/* 下拉面板 */
.searchable-select .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dce0e8;
    border-radius: 0 0 12px 12px;
    z-index: 100;
    max-height: 260px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    margin-top: -2px;
}
.searchable-select .dropdown.open {
    display: block;
}

/* 搜索输入 */
.searchable-select .dropdown .search-input {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f4f9;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.searchable-select .dropdown .search-input input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dce0e8;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: 0.2s;
    background: #fff;
}
.searchable-select .dropdown .search-input input:focus {
    border-color: #1a3a6b;
}

/* 选项列表 */
.searchable-select .dropdown .options {
    max-height: 180px;
    overflow-y: auto;
    padding: 4px 0;
}
.searchable-select .dropdown .option-item {
    padding: 10px 16px;
    font-size: 14px;
    color: #0b1a2f;
    cursor: pointer;
    transition: background 0.15s;
}
.searchable-select .dropdown .option-item:hover {
    background: #e8edf5;
}
.searchable-select .dropdown .option-item.selected {
    background: #d1fae5;
    color: #065f46;
}
.searchable-select .dropdown .option-item .highlight {
    color: #1a3a6b;
    font-weight: 600;
}

/* 无结果 */
.searchable-select .dropdown .no-result {
    padding: 16px;
    text-align: center;
    color: #8a99b3;
    font-size: 14px;
}

/* ================================================================
   ===== 响应式：小屏适配 =====
   ================================================================ */
@media (max-width: 480px) {
    .login-body { padding: 0; }
    .login-box {
        max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
        padding: 40px 22px 28px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* ================================================================
   ===== 禁用 iOS 输入框阴影和默认样式 =====
   ================================================================ */
.login-box input,
.login-box select,
.login-box textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.login-box input:focus {
    outline: none;
    box-shadow: none;
}