/* --- 全局重置 --- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f7f8fa;
    color: #333;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- 顶部导航栏 --- */
.header {
    height: 44px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.header-title {
    font-size: 17px;
    font-weight: 500;
}
.back-btn {
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    width: 40px;
    text-decoration: none;
    color: #333;
}
.back-btn::before {
    content: "‹";
    font-size: 24px;
    font-weight: bold;
}

/* --- 主体内容区 --- */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* --- 地址卡片 --- */
.address-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.card-info {
    margin-bottom: 12px;
}
.user-row {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}
.phone-num {
    font-weight: normal;
    margin-left: 10px;
    color: #333;
}
.address-detail {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 操作区域 */
.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f5f5f5;
    padding-top: 12px;
}

/* 默认标记 */
.default-tag {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #333;
}
.radio-circle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #ccc;
    margin-right: 6px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.radio-circle.active {
    border-color: #1890ff;
}
.radio-circle.active::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #1890ff;
    border-radius: 50%;
}

/* 操作按钮 */
.action-group {
    display: flex;
    align-items: center;
}
.action-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    text-decoration: none;
    color: #666;
}
.action-item::before {
    content: "";
    width: 14px;
    height: 14px;
    margin-right: 4px;
    opacity: 0.7;
}
.edit-btn::before {
    content: "✏️";
}
.delete-btn::before {
    content: "🗑️";
}
.divider {
    width: 1px;
    height: 12px;
    background-color: #e5e5e5;
    margin: 0 16px;
}

/* --- 表单区域 --- */
.form-container {
    background-color: #fff;
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
}
.form-item {
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 55px;
    border-bottom: 1px solid #f0f0f0;
}
.form-item:last-child {
    border-bottom: none;
}
.label {
    width: 90px;
    font-size: 15px;
    color: #333;
    flex-shrink: 0;
}
.required {
    color: #ff4d4f;
    margin-left: 2px;
}
.input-box {
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    color: #333;
    background: transparent;
}
.input-box::placeholder {
    color: #ccc;
}

/* 地区选择 */
.select-wrapper {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    cursor: pointer;
}
.select-text {
    color: #ccc;
    font-size: 15px;
}
.arrow-icon {
    width: 12px;
    height: 12px;
    border-right: 2px solid #ccc;
    border-bottom: 2px solid #ccc;
    transform: rotate(-45deg);
    margin-right: 5px;
}

/* --- 设为默认开关区域 --- */
.switch-area {
    background-color: #fff;
    margin-top: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 8px;
}
.switch-label {
    font-size: 15px;
    color: #333;
}

/* iOS 风格开关 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #e9e9e9;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .slider {
    background-color: #4facfe;
}
input:checked + .slider:before {
    transform: translateX(22px);
}

/* --- 底部按钮区域 --- */
.bottom-bar {
    background-color: #fff;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid #eee;
    flex-shrink: 0;
}
.add-btn, .submit-btn {
    width: 100%;
    height: 44px;
    background-color: #4da6ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}
.add-btn:active, .submit-btn:active {
    opacity: 0.9;
}

/* --- 空状态 --- */
.empty-state {
    text-align: center;
    padding: 70px 20px;
    color: #999;
}
.empty-state img {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    opacity: 0.5;
}